Scripting Blog [archived]

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

How Can I Be Notified Any Time a Network Cable Gets Unplugged?

(image) Hey, Scripting Guy! Is there a way I can be notified any time a network cable gets unplugged on a computer?-- DD(image) (image) (image) Hey, DD. A lot of people, when growing up, had a grandmother or an aunt or someone somewhere who had a house with a big attic, an attic overflowing with stuff. Admittedly, most of the time you had ...

How Can I Create an Environment Variable Using a Script?

(image) Hey, Scripting Guy! Can I create an environment variable using a script?-- OD(image) (image) (image) Hey, OD. WMI is a great technology for scripting, but it has its eccentricities. For example, can you create a process using a script? Of course you can; after all, WMI’s Win32_Process class has a Create method. Can you create a ...

How Can I Move Files Based on Their File Extension?

(image) Hey, Scripting Guy! I have a folder with a bunch of files in it. I need to move all those files; the only problem is that the files need to be moved to different folders depending on their file extensions. For example, I want all the .log files to go here, all the .bak files to go there, etc. How can I do that using a script?-- SH(...