Scripting Blog [archived]

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

How Can I Tell if a Folder Has Any Files with a Specific File Extension?

(image) Hey, Scripting Guy! How can I verify whether or not any files with a specific file extension exist in a folder?-- GM(image) (image) (image) Hey, GM. This is actually a pretty easy thing to do. All we have to do is write a WMI query that includes the path of the folder we want to check as well as the file extension we’re checking ...

Can I Use a Script to Rename All the Files in a Folder?

(image) Hey, Scripting Guy! Can I use a script to rename all the files in a directory and include a "pl-" prefix plus the original file name?-- JP(image) (image) (image) Hey, JP. It’s interesting how many people need to do something similar: they need to rename all the files in a given folder, either by appending the date, changing the ...