Scripting Blog [archived]

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

Weekend Scripter: Use PowerShell and Pinvoke to Remove Stubborn Files

Summary: Windows PowerShell MVP, Boe Prox, talks about using Windows PowerShell and Pinvoke to delete locked files. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a guest blog post by newly crowned Windows PowerShell MVP, Boe Prox. Long-time readers of the Hey, Scripting Guy! Blog are familiar with Boe’s work, but this ...

Hey, Scripting Guy! How Can I Remove Duplicate Values From a Pair of Text Files?

(image) Hey, Scripting Guy! I have two text files that contain numbers. I need to write a script that can determine whether a given number exists in both of these text files. If it does, I need to delete that line from each of the two files. How do I do that?-- KT(image) (image) (image) Hey, KT. Before we get started today, we have a ...

Hey, Scripting Guy! How Can I Replace Text That Includes Double Quote Marks and a Tab Character?

(image) Hey, Scripting Guy! I read one of your columns on replacing text in a file and I found it very useful. However, I have a somewhat more-complicated need: I want to replace text that includes both double quote marks and a tab character. How can I do that?-- FC(image) (image) (image) Hey, FC. Your know, as anyone who’s ever read Hey...

How Can I Copy Selected Columns From a CSV File to an Excel File?

(image) Hey, Scripting Guy! How can I copy selected columns from a CSV file to an Excel file?-- MdP (image) (image) (image) Hey, MdP. One thing that people always worry about (and rightly so) is that one of these days the Scripting Guys will do something that tears a hole in the space-time continuum. Some of you might be concerned that ...

How Can I Convert a Tilde-Delimited File to Microsoft Excel Format?

(image) Hey, Scripting Guy! How can I convert a tilde-delimited file to Microsoft Excel format?-- JN(image) (image) (image) Hey, JN. You know, to tell you the truth we’re beginning to rethink our approach to this column. After all, usually we tell people how easy things are, and how – without much effort – they can write a script that ...