Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Replace Incorrect Dates in My File Names?

(image) Hey, Scripting Guy! have a folder that has a whole bunch of files in it. Many of those files have a file name that includes an incorrect date; for example, the file might be named FGA Site Visit 2-14-07 204.jpg when it should really be named FGA Site Visit 2-14-08 204.jpg. (That is, it suggests the visit occurred in 2007 rather than ...

Hey, Scripting Guy! How Can I Enable Users to Change File Extensions Using the SendTo Command?

(image) Hey, Scripting Guy! Here’s what I would like to do. I would like to put a script in the SendTo folder that would enable a user to easily change the file extension for a file. (Typically our users hide the file extensions, which makes it difficult for them to change those extensions when they need to.) However, I haven’t ...

Hey, Scripting Guy! How Can I List All the Duplicate Files in a Folder and Its Subfolders?

(image) Hey, Scripting Guy! How can I list all the duplicate files (that is, files with the same file names) in a folder and its subfolders?-- GK (image) (image) (image) Hey, GK. We have to apologize, but you picked a bad day to ask a question. That’s because the Scripting Guy who writes this column is working on his biography for ...

Hey, Scripting Guy! How Can I Determine If Any of the Files in a Folder Have Been Modified in the Past 90 Days?

(image) Hey, Scripting Guy! On my file servers I periodically want to check a folder to see if that folder or any of its subfolders have files that are no longer being updated. What I’d like to do is check each file in each folder to see if they’ve been modified in the past 90 days. If I find a folder in which none of the files have been...

Hey, Scripting Guy! How Can I Delete Files That Are a Specified Number of Hours Old?

(image) Hey, Scripting Guy! I’ve seen scripts that let you delete all the files in a folder that are X number of days old. I have a different problem: I’d like to delete files that are X number of hours, or even X number of minutes, old. How can I do that?-- DF(image) (image) (image) Hey, DF. Did you see where some researchers are ...