Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Use Windows PowerShell to Determine the Owner of a File?

(image) Hey, Scripting Guy! Is it possible to determine the owner of a file using Windows PowerShell?-- GF(image) (image) (image) Hey, GF. Well, today is April 15th, which, in the US, can mean only one thing: it’s time to celebrate the birthday of Italian mathematician Pietro Antonio Cataldi, best known for discovering the sixth and ...

Hey, Scripting Guy! How Can I Import a Fixed-Width Data File into Microsoft Excel?

(image) Hey, Scripting Guy! How can I import a fixed-width data file into Microsoft Excel?-- RS(image) (image) (image) Hey, RS. This column is being written on a Friday morning, and so far it’s been a very weird morning at that. For one thing, it’s not raining and – if you look closely – you can even see the sun. (It’s been ...

Hey, Scripting Guy! How Can I Use Windows PowerShell to Look at All the Microsoft Office Documents in a Folder?

(image) Hey, Scripting Guy! I am trying to use Windows PowerShell to look at files on my computer; what I want to do is get back a history (that is, the last time a document was accessed) for all the Microsoft Office files in a folder and its subfolders. However, I’m not having much luck. Any ideas would be appreciated.-- KM(image) (image...

Hey, Scripting Guy! How Can I Delete Duplicate Entries in a Tab-Delimited File?

(image) Hey, Scripting Guy! How can I delete the duplicate entries in a tab-delimited file?-- ST(image) (image) (image) Hey, ST. Before we start, is anyone out there familiar with the book Not Quite What I Was Planning: Six-Word Memoirs by Writers Famous and Obscure? Not Quite What I Was Planning is an interesting little book in which the ...

Hey, Scripting Guy! How Can I Conditionally Add Lines to a Text File?

(image) Hey, Scripting Guy! I need a script that can read a file and, based on the contents, insert some additional lines of text into that file. Can you help me with that?-- JS(image) (image) (image) Hey, JS. We’re sure that most of you have heard by now that Microsoft has made an offer to buy Yahoo!, an offer currently valued at around...