Scripting Blog [archived]

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

How Can I Check Every 30 Minutes to See If a File Has Been Modified?

(image) Hey, Scripting Guy! How can I monitor an application’s log file and issue an alert if the timestamp on that file hasn’t changed in the last 30 minutes?-- JA (image) (image) (image) Hey, JA. You know that’s a very interesting question, and one that – say, wait a second. You’re not JA from Stanwood, WA are you? Are you sure...

How Can I Delete Specified Characters From the Beginning and End of My File Names?

(image) Hey, Scripting Guy! How can I truncate file names by removing a common beginning and ending, leaving only the unique middle portion of the name?-- RE (image) (image) (image) Hey, RE. Before we answer your question we’d like to point out that we’ve finally posted the winners of the Scripting Guys TechEd Challenge. (If you are a ...

How Can I Create a Custom Dialog Box?

(image) Hey, Scripting Guy! How can I create a custom dialog box that presents the user with two options, and then runs the appropriate subroutine based on the option they chose?-- AM (image) (image) (image) Hey, AM. Well, today is another day, which is good; after all, yesterday was anything but a banner day here in the scripting world, ...

How Can I Add an HTML Tag to the End of Each Line in a File?

(image) Hey, Scripting Guy! I have a bunch of documents I’m trying to transfer to MySpace. In order to do so, I need to put the <br> tag at the end of each and every line in the document. Is there any way to do that using Microsoft Word, or even Notepad?-- MM (image) (image) (image) Hey, MM. You know, most people dislike spam. (We ...

How Can I Display a Default Message If Nothing Has Been Typed Into a Text Box?

(image) Hey, Scripting Guy! Sometimes you go to a Web page and you’ll see a text box that includes some instructions, something like “Please type a description in this box.” When you click on the text box, those instructions disappear; however, if you click on the box, don’t type in a description and then click somewhere else, then ...