Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Create a Disk Space Report in a Word Document?

(image)     (image) Hey, Scripting Guy! We are having problems with several of our servers at work. Several of them were upgraded from Windows NT 4, and as a result, we are constantly running into disk space issues on the C: drive. I would rather manage the problem than take the servers down and rebuild them because we already have...

Hey, Scripting Guy! Does the Win32_Volume WMI Class Support Filtering on the Name Property?

(image)   (image) Hey, Scripting Guy! I have a problem using the Win32_Volume WMI class on my Windows Vista computer. I keep getting an error. I have searched the Internet using Bing and other search engines, but I cannot find the answer to my problem. It should be so simple; all I want to do is filter the results by the drive name in ...

Hey, Scripting Guy! How Can I Tell How Much Free Disk Space a User Has?

(image) I know most people have heard of Moore’s Law that is named after Gordon Moore, but have you ever heard of Bob’s law? Bob was the senior network administrator when I first became an IT pro, and he created what he called Bob's Law. Briefly stated it says this: "A user's demand for storage space will always expand to meet the ...

Hey, Scripting Guy! How Can I Copy a File to a Removable Drive If I Don’t Know the Drive Letter of That Drive?

(image) Hey, Scripting Guy! How can I determine if a computer has a removable drive attached to it and, if it does, copy a file to that drive? I have no way of knowing what the drive letter of that removable drive would be, assuming it even exists.-- SN(image) (image) (image) Hey, SN. You know, when you live in Seattle you don’t really ...

Hey, Scripting Guy! How Can I Verify That a User Entered a Valid Drive Letter?

(image) Hey, Scripting Guy! How can I make sure that data entered into an InputBox has the form X:, where X is any alphabetic character? That’s important, because I need to use this string to map logical drives in a script. The script should validate any string such as D:, E:, or F: but flag as incorrect any string such as 9:, !:, 22: etc...