Welcome to TechNet Blogs Sign in | Join | Help

Browse by Tags

All Tags » regular expressions   (RSS)

Hey, Scripting Guy! How Can I Clean Up File Names?

Share this post: Hey, Scripting Guy! We have a number of files that were manually created by various people in a common folder. Unfortunately, they did not follow a specific naming convention as well as they should, and as a result they do not sort very

Hey, Scripting Guy! Can I Create New Folders in a Sequentially Numbered Series?

Share this post: Hey, Scripting Guy! I hate to type numbers. I actually took typing in high school and did really well with it. I was able to type more than 40 words per minute at the end of the class with no errors. I got an A for the class. But, I was

Hey, Scripting Guy! Can I Update More Than One Text File?

Hey Scripting Guy! I am trying to convert a number of text files that have been used to create old Web pages to a Web site that uses a new format. The problem is that the text files are not in a standard format. I need to identify the shortest lines in

Hey, Scripting Guy! Can I Search a Text File to Work with Specific Text?

Hey Scripting Guy! I have a log file that is produced by an application. The file is simply text, and is not really formatted in any discernable way. I can open the log in Notepad and use the <ctrl-f> (control –f) command to search the text file

Hey, Scripting Guy! Can I Query a Microsoft Access Database with a Windows PowerShell Script?

Hey Scripting Guy! I have a Microsoft Access database that I need to query from a Windows PowerShell script. I have seen a number of VBScript examples, but I cannot find any Windows PowerShell samples. Can you point me in the right direction? I do not

Hey, Scripting Guy! How About a Formal Wrap-Up of the 2009 Summer Scripting Games?

Hey Scripting Guy! Whatever happened to the Summer Scripting Games? There was all the build up to the games, and then the games were over, and that was it. It would be nice to know what happened. Can you do a recap or something? -- ZQ Hello ZQ, Microsoft

Hey, Scripting Guy! How Can I Parse My Firewall Log File to See What Kind of Packets Are Being Sent?

Hey, Scripting Guy! I would like to parse the firewall log on my computer and find out the kinds of packets that are going out. You know, how many Web page packets, how many DNS lookups, how many pings. That kind of stuff. I figure that I can look at

Hey, Scripting Guy! How Can I See Which Packets Are Being Dropped by Windows Firewall?

Hey, Scripting Guy! I love the Windows Firewall. I think it is really cool. The fact that it is a low-maintenance tool is sweet, but every once in a while, I would like to look over the log files and see what is going on. In particularly, I want to know

Hey, Scripting Guy! How Can I Convert a Tab-Delimited File to a Comma-Separated Value File?

Hey, Scripting Guy! I have this tab-delimited file that was produced by a report from an old database application. All it knows how to do is make a tab-delimited file. I hate this format, and our other applications do too. I have been opening the thing

Hey, Scripting Guy! How Can I Create a Phone Directory from Files with Varying Text Formats?

Hey, Scripting Guy! I have a folder full of text files that have user contact information. I think these files were produced by an old database backup. I have to create a phone directory from these files; I thought about trying to read each file and copy

How Can I Locate Strings That Consist of a Series of Numbers Followed by .ZIP?

Hey, Scripting Guy! I have a file which includes a number of file names. All of these names consist of a series of numbers followed by a .zip file extension; for example, 1234.zip, 5678.zip, etc. How can I write a script that locates all these file names

How Can I Verify That All the Characters in a String are Either A-to-Z (Uppercase Letters) or the Digits 0-through-9 in a HTA?

Hey, Scripting Guy! In an HTA, how can I verify that all the characters are either A-to-Z (uppercase letters) or the digits 0-through-9? -- MB Hey, MB. You want to talk irony? Oh. Well, we’re going to talk irony anyway. In yesterday’s column we tried

How Can I Tell Whether a Phrase Occurs At Least Twice in a Text File?

Hey, Scripting Guy! How can I tell whether or not the phrase 226 transfer complete occurs at least twice in a text file? -- JR Hey, JR. You know, this was a tough one for us to answer; that’s because the Scripting Guys are always content with just one

How Can I Truncate Names to a Maximum of 16 Characters?

Hey, Scripting Guy! How can I truncate names to a maximum of 16 characters? -- BN Hey, BN. Brace yourself: it’s time for another trip down memory lane. When one of the Scripting Guys was going to college, he took a temporary summer job with the Green

How Can I Extract a Series of Characters Found in the Middle of a String?

Hey, Scripting Guy! I have a series of strings that look something like this: xxxxyyyyyyxx . How can I extract just the y’s? -- JB Hey, JB. And, yes, it is a Friday. But, hey, it’s just a coincidence that we happened to pick an easy question on a Friday,
 
Page view tracker