Scripting Blog [archived]

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

How Can I Replace the First Five Characters in a Text File With the First Five Characters in the Computer Name?

(image) Hey, Scripting Guy! How can I open a text file and replace the first 5 characters with the first 5 characters of the local computer name?-- EC(image) (image) (image) Hey, EC. You know, you might find this hard to believe (his fellow Scripting Guys absolutely refuse to believe it), but sometimes the Scripting Guy who writes this ...

How Can I Write a Script That Increments a Counter Each Time a Log File is Updated?

(image) Hey, Scripting Guy! How can I write a script that increments a counter each time a particular log file gets updated?-- HJ(image) (image) (image) Hey, HJ. You know, lately the Scripting Guy who writes this column has been victimized by a disturbing phenomenon: he keeps getting phone calls from machines. For the past several nights ...

How Can I Get a List of All the Local Users Who Have an Expiring Password?

(image) Hey, Scripting Guy! How can I get a list of all the local users who have an expiring password?-- JM(image) (image) (image) Hey, JM. Thanks for the question. Before we answer it, however, we have a question for you: you don’t by any chance have any spare dice lying around, do you? That’s right, dice, the kind you use when ...

How Can I Tell Which Version of QuickTime is Installed on a Computer?

(image) Hey, Scripting Guy! How can I tell whether or not QuickTime is installed on a computer, and, if so, which version is installed?-- IU(image) (image) (image) Hey, IU. You know, for some reason this column suddenly seems to have become a daily dancing column rather than a daily scripting column. After all, just yesterday we recapped ...

How Can I Tack a Prefix Onto the Telephone Numbers of All the Users in My Domain?

(image) Hey, Scripting Guy! How can I tack a prefix onto the telephone numbers of all the users in my domain?-- JB(image) (image) (image) Hey, JB. It’s Monday morning as this column is being written, and the Scripting Guy who actually writes this column is still a bit tired from driving across the state and back in order to attend his ...