Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Extract All the Text Between Two Tags in a Text File?

(image) Hey, Scripting Guy! I have a whole bunch of text files in a folder. I need to open each of these files, extract everything between the <filecount> and </filecount> tags, and then write that information to a separate file. How can I do that?-- RP(image) (image) (image) Hey, RP. You know, the other day the Scripting Guy ...

Hey, Scripting Guy! How Can I Convert a Number to a Date and Then Back in Excel?

(image) Hey, Scripting Guy! We have a spreadsheet that includes numbers like this: 31738. However, this isn’t supposed to be a number, it’s actually supposed to be a date: 11/22/1986. How can I convert these numbers to dates and then, if needed, convert those dates back to numbers?-- TC(image) (image) (image) Hey, TC. Yes, as a matter ...

Hey, Scripting Guy! How Can I Retrieve a List of Unique Users from the Security Event Log?

(image) Hey, Scripting Guy! How can I retrieve a list of unique users from the Security event log?-- KM(image) (image) (image) Hey, KM. Before we tackle your question we should probably address a question sent in by another reader: Hey, Scripting Guy! Whatever happened to Monday? Having been gone on vacation all last week, I was ...

Hey, Scripting Guy! How Can I Tell if a Computer is Bluetooth-Enabled?

(image) Hey, Scripting Guy! How can I tell if a computer is Bluetooth-enabled?-- RR(image) (image) (image) Hey, RR. You know, any time the Scripting Guys get asked something like this, one question immediately pops into our minds: “So where did the name Bluetooth come from anyway?” As it turns out, the Bluetooth “personal area ...

Hey, Scripting Guy! How Can I Insert New Rows Above the Last Row in an Office Excel Spreadsheet?

(image) Hey, Scripting Guy! I have an Office Excel spreadsheet in which the last row in the spreadsheet sums all the rows above it. How can I add new rows (and new data) to this spreadsheet, making sure that the last row always sums up all the rows above it?-- AW(image) (image) (image) Hey, AW. By the way, please excuse the mess; at the ...