Hey, Scripting Guy! I have a bunch of Word documents in a folder. I need to open each document, read in some information from the first two lines, then use that information to rename the file. However, I’m having some trouble getting this to work. Can you help me? — TG Hey, TG. As devoted…
Year: 2008
Hey, Scripting Guy! How Can I Add a Record to a Database Using Windows PowerShell?
Hey, Scripting Guy! Awhile back you showed us how we could use Windows PowerShell to retrieve data from a Microsoft Access database. I’m now trying to add data to a database using PowerShell, but I can’t get the script to work. Any chance you could show me how to add a record to a database…
Hey, Scripting Guy! How Can I Search For a Folder and Return the Folder Path?
Hey, Scripting Guy! How can I search a computer for a folder, and return the folder’s complete path? — AW Hey, AW. We know a lot of you have been sitting on pins and needles, waiting for this announcement, so we won’t waste any time: yes, the Scripting Son has officially been accepted by the…
Hey, Scripting Guy! How Can I Tally All the Items in a Microsoft Word Document?
Hey, Scripting Guy! We have an application that repeatedly runs a test and writes the result of each test pass to a Microsoft Word document. Periodically I’d like to be able to use a script to tally up the number of times a test passed, the number of times a test failed, and the number…
Hey, Scripting Guy! How Can I List All the Duplicate Files in a Folder and Its Subfolders?
Hey, Scripting Guy! How can I list all the duplicate files (that is, files with the same file names) in a folder and its subfolders? — GK Hey, GK. We have to apologize, but you picked a bad day to ask a question. That’s because the Scripting Guy who writes this column is working on…
Hey, Scripting Guy! How Can I Reset the Revision Number of a Word Document to 1?
Hey, Scripting Guy! How can I reset the revision number of a Microsoft Word document back to 1? — JL Hey, JL. You know, a lot of people think the Scripting Guys have lost their edge. “You guys used to write all these crazy scripts that used all these weird and wacky workarounds in order…
Hey, Scripting Guy! How Can I Modify the Email Addresses of All the Users in an OU and Its SubOUs?
Hey, Scripting Guy! I need to get a list of all the users in an OU and its subOUs, then change their email addresses so those addresses only user lowercase letters. How can I do that? — TB Hey, TB. You know, we had to think twice before going ahead and answering this question….
Hey, Scripting Guy! How Can I Copy the Membership of a Local Group to a New Local Group?
Hey, Scripting Guy! I need to “clone” a local group; in other words, I want to create a new group that contains the same members as the original group. However, I can’t find any sort of copy command that would let me do this. How can I copy the membership of a local group…
Hey, Scripting Guy! How Can I Add a Domain Group to a Local Group?
Hey, Scripting Guy! How can I add a domain group to a local group? — DR Hey, DR. Before we begin today, any chance that we could borrow $5 billion, at least until the next payday? Admittedly, it’s not our habit to go around asking for money, especially an amount of money as big…
Hey, Scripting Guy! How Can I Delete a Set of Records From an Access Database?
Hey, Scripting Guy! We have an Access database that we use to keep track of resources that are associated with all of our projects. Periodically I need to go into the database and delete all the records tied to a particular project. Is there any way that I can do that using a script? –…