Scripting Blog [archived]

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

How Can I Apply a New Template to a PowerPoint Presentation?

(image) Hey, Scripting Guy! My company has just created a new PowerPoint template, and has decided that we need to use this template for all our presentations. How can I apply this new template to all the presentations in my C:\Presentations folder?-- OI(image) (image) (image) Hey, OI. You know, this morning the Scripting Guy who writes ...

How Can I Dynamically Show Available Drive Letters in a List Box?

(image) Hey, Scripting Guy! I’m using an HTA as a drive-mapping application. I’d like to be clever about this and have the available drive letters appear in a list box. How can I dynamically show all the drive letters available on a computer?-- JT(image) (image) (image) Hey, JT. You know, just the other day the Scripting Guy who writes...

How Can I Move Files Off a User’s Desktop and Into Specified Folders?

(image) Hey, Scripting Guy! For various reasons, we don’t want our users storing “loose” files on their desktop. How can I write a script that will take all the files on the user’s desktop and, based on the file extension, move those files to the appropriate desktop folder? For example, if I have a file with a .doc file extension I...

How Can I Parse a Comma-Separated Values File?

(image) Hey, Scripting Guy! I have a text file which consists of individual fields separated by commas. I need to look at the second field in each line and, if it includes the word Everyone, I then need to take the sixth field in the line and write that value to a second text file. How can I do that?-- RP(image) (image) (image) Hey, RP. ...