Scripting Blog

A place to learn about PowerShell and share stories of automation

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?

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 Hey, KT. Before we get started today, we have a little business to take care of. ...

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

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 Hey, FC. Your know, as anyone who’s ever read Hey, Scripting Guy! could tell you...

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

Hey, Scripting Guy! How can I copy selected columns from a CSV file to an Excel file?-- MdP 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 this has finally happened: after ...

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

Hey, Scripting Guy! How can I convert a tilde-delimited file to Microsoft Excel format?-- JN 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 will let them accomplish some ...

Feedback usabilla icon