Scripting Blog [archived]

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

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

How Can I Assign a Background Color to Cells in a Spreadsheet and Then “Sum” Those Cells?

(image) Hey, Scripting Guy! How can I assign a background color (based on a specified value) to a spreadsheet cell and then “sum” those cells?-- JC(image) (image) (image) Hey, JC. Thanks for the question. And yes, you heard correctly: in his last game the Scripting Son did indeed go 4-for-4, banging out three singles and a double. That...

How Can I Start a Process and Then Log the User Off When That Process Ends?

(image) Hey, Scripting Guy! How can I write a script that starts a process, waits until that process ends, and then logs the user off the computer?-- AG(image) (image) (image) Hey, AG. You know, the Scripting Guy who writes this column is never one to brag, mainly because he never has much of anything to brag about. In addition tot that, ...

How Can I Get the Command Window to Stay Open When I Right-Click a Script and Choose Open With Command Prompt?

(image) Hey, Scripting Guy! How can I get the command window to stay open when I right-click a .VBS file and choose Open With Command Prompt??-- BB(image) (image) (image) Hey, BB. You know, according to BB’s email signature, he’s 9 years old. If that’s true, well, that’s absolutely amazing. A 9-year-old who knows VBScript? At age 9...