Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I See Which Packets Are Being Dropped by Windows Firewall?

(image) Hey, Scripting Guy! I love the Windows Firewall. I think it is really cool. The fact that it is a low-maintenance tool is sweet, but every once in a while, I would like to look over the log files and see what is going on. In particularly, I want to know about what packets are being dropped by the firewall. Can you help me?- DC(image...

Hey, Scripting Guy! How Can I Convert a Tab-Delimited File to a Comma-Separated Value File?

(image) Hey, Scripting Guy! I have this tab-delimited file that was produced by a report from an old database application. All it knows how to do is make a tab-delimited file. I hate this format, and our other applications do too. I have been opening the thing in Notepad and trying to find and replace tabs with commas, but Notepad does not ...

Hey, Scripting Guy! How Can I Create a Phone Directory from Files with Varying Text Formats?

(image) Hey, Scripting Guy! I have a folder full of text files that have user contact information. I think these files were produced by an old database backup. I have to create a phone directory from these files; I thought about trying to read each file and copy just the fourth line from each of the files. Unfortunately, in some of the files ...

Hey, Scripting Guy! Australian Dispatch #3: Self-Contained Underwater Breathing Apparatus

Cold. My nose is cold. My left eye opens slowly to investigate. Everything is dark. Cold and dark. "So why am I awake," I wonder seemingly to myself. No answers are forthcoming. So my right eye slowly opens to bring a modicum of assistance to the ongoing investigation. Still no answers present themselves. Where am I? What country am I in? "...

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...