Scripting Blog [archived]

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

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 Find All the Files in a Directory Tree that Contain a Specific Word or Phrase?

(image) Hey, Scripting Guy! How can I find all the files in a directory tree that contain a specified phrase?-- PB (image) (image) (image) Hey, PB. OK, so picture this: for the first time in a couple of months, the Scripting Guy who writes this column and the Scripting Son are playing basketball. The Scripting Son has a comfortable lead, ...

How Can I Delete the Oldest File From a Folder If and When That Folder Exceeds a Specified Size?

(image) Hey, Scripting Guy! I need to check the size of a folder once every hour; if the folder has exceeded a specified size, I then need to delete the oldest file in that folder. How can I do that?-- JC (image) (image) (image) Hey, JC. You know, a lot of you are thinking, “Gee, I wonder what was the very best, very coolest thing that ...

How Can I Copy the Folder Structure of a Folder?

(image) Hey, Scripting Guy! How can I copy the folder structure of a folder (that is, a folder and all its subfolders) without copying the files as well?-- AS (image) (image) (image) Hey, AS. If you’re one of the many people who simply can’t get through the day without knowing what the Scripting Guy who writes this column is up to as ...