Scripting Blog [archived]

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

How Can I Delete All Files Older Than a Specified Date?

(image) Hey, Scripting Guy! I’d like to have a script that can search my computer for all files older than a certain date, and then automatically delete those files. Can I do that?-- GM(image) (image) (image) Hey, GM. Can you write a script that will search for and delete all the old files on your computer? You bet. Should you write a ...

How Can I Change a Read-only File to a Read-write File?

(image) Hey, Scripting Guy! How can I change a read-only file to a read-write file?-- WR(image) (image) (image) Hey, WR. We don’t mean to shock you, but how can you change a read-only file to a read-write file? Why, by using a script, of course! We know: you never saw that coming, did you? As a matter of fact, you can use this script, ...

How Can I Determine if My Users Have Certain Files on Their Computers?

(image) Hey, Scripting Guy! Is it possible to search a computer for .MP3 files or other files my users aren’t supposed to have?-- AK(image) (image) (image) Hey, AK. Once again it’s WMI to the rescue. Using the CIM_DataFile class it’s easy to search a computer for specific file types. Want to know if your users have any .MP3 files ...