Scripting Blog [archived]

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

How Can I Monitor the Number of Files in a Folder?

(image) Hey, Scripting Guy! We have a third-party application that rarely crashes; however, when it does crash it seriously disrupts our business. We can always tell when the application is getting ready to crash; at that point, one of its directories starts filling up with log files. How can we be notified any time the number of log files ...

How Can I Search Every Text File in a Folder For Phone Numbers?

(image) Hey, Scripting Guy! In yesterday’s column you showed us how to search for phone numbers in a text file; you also promised us that in today’s column you’d show us how to modify that script so that it can search through all the text files in a folder. Are you still going to do that?-- SE(image) (image) (image) Hey, SE. Yes, we...

How Can I Remove the First Five Lines From All the Log Files in a Folder?

(image) Hey, Scripting Guy! I have about 400 log files in a folder. I need to go in and remove the first 5 lines from each of those log files. How can I write a script to do that?-- JW(image) (image) (image) Hey, JW. Before we begin we need to issue a clarification. A few days ago we reported that the Scripting Guy who writes this column ...