Scripting Blog [archived]

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

How Can I Add a Line to the Top of a Text File?

(image) Hey, Scripting Guy! How can I add a line to the top of a text file?-- FT(image) (image) (image) Hey, FT. You know, at one point in his career Sir Arthur Conan Doyle actually killed off Sherlock Holmes, figuring he’d written everything anyone could ever write about the master detective. Public outcry soon made him change his mind...

How Can I Determine the Size of the My Documents Folder?

(image) Hey, Scripting Guy! How can I determine the size of the My Documents folder?-- SC(image) (image) (image) Hey, SC. The My Document folder is actually just another folder on the hard disk, one with a path similar to this: C:\Documents and Settings\kenmyer\My Documents. Of course, the actual path will vary depending on the name of the...

How Can I Tell Whether a Web Page is Accessible?

(image) Hey, Scripting Guy! How can I tell whether or not a Web page is accessible?-- JW(image) (image) (image) Hey, JW. To tell you the truth, these are the kinds of questions we hate, questions where we don’t know the answer off the top of our heads but where it seems like there ought to be a way to do this. Sometimes in the world of ...

Can I Edit .INI Files Using a Script?

(image) Hey, Scripting Guy! Can I edit.INI files using a script?-- MZ(image) (image) (image) Hey, MZ. Yes, you can edit .INI files (or any kind of text files, for that matter) using a script. The method you have to use might not be the most elegant process in the world, but it’ll work. And that’s all we really care about, right? Before...

How Can I Create a CSV File?

(image) Hey, Scripting Guy! How can I create a CSV file?-- LF(image) (image) (image) Hey, LF. For those of you who aren’t up on your acronyms, CSV is short for comma-separated-values file, a text file in which individual elements are separated by commas. For example, say you have a CSV file consisting of user first names, last names, and...