Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Back Up a Database’s Data Folder While the Database Is Running?

(image) Hey, Scripting Guy! I have a problem. I am trying to script the backup of a data folder used by our database application. The problem is that as long as the database service is running, the files that are used are locked, and I am unable to copy them. I have found the service that runs the database, and when I use WMI to stop the ...

Hey, Scripting Guy! How Can I Write to Excel Without Using Excel?

(image) Hey, Scripting Guy! I need to be able to write information to an Excel file. I do not want to install Microsoft Office Excel on my server, but the spreadsheet format is a nice way to store information. I can then give it to my pointy-headed boss, and he can create pivot tables, charts, or whatever exactly it is he does all day. ...

Hey, Scripting Guy! How Can I Read from Excel Without Using Excel?

(image) Hey, Scripting Guy! I have an Microsoft Office Excel spreadsheet with server names in it, and I would like to be able to use this in a Windows PowerShell script. The thing is, I do not have Microsoft Office or Excel installed on the server. How can I use this spread sheet without installing Office on my server (which I understand ...

Hey, Scripting Guy! How Can I Sort Digital Files By the Date Each Picture Was Taken?

(image) Hey, Scripting Guy! I read your article on renaming image files so that the pictures could then be sorted in chronological order. When I ran your script, however, it didn’t quite work for me: the files were renamed, but the pictures weren’t sorted the way I had hoped they would be. I think that’s because the pictures were being...

Hey, Scripting Guy! How Can I Use a Disconnected Recordset in Windows PowerShell?

(image) Hey, Scripting Guy! How can I use a disconnected recordset in Windows PowerShell? I’m able to create the recordset without any problem, but I can’t figure out how to reference the fields and values in that recordset.-- JVDL(image) (image) (image) Hey, JVDL. Well, we must say, we’re impressed by how cool, calm, and collected ...