Showing tag results for string manipulation

Jun 29, 2010
Post comments count0
Post likes count0

Hey, Scripting Guy! How can I use Windows PowerShell to Search a Text File for multiple strings?

ScriptingGuy1

    Q: Hey Scripting Guy! I need help migrating a script from VBScript to Windows PowerShell 2.0. The VBScript is one that I based upon an old Hey Scripting Guy! article. I use it to search a text file for specific words. If the words are found, the script displays a message stating this fact. I do not want to learn Windows PowerSh...

Scripting Guy!Windows PowerShellscripting techniques
Jun 28, 2010
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Use Windows PowerShell to Create a Text File with Fixed-Length Lines?

ScriptingGuy1

    Hey, Scripting Guy! I am trying to learn Windows PowerShell 2.0, but I am having some issues when it comes to string manipulation. I have been a faithful reader of the Scripting Guys for several years, and I have found many of the scripts to be critical in my business environment. I wish I could simply translate the VBScript s...

Scripting Guy!Windows PowerShellscripting techniques
Sep 21, 2009
Post comments count0
Post likes count0

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

ScriptingGuy1

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 well. Some people preceded the file names with the word “File,” and others appended their name to the file....

Scripting Guy!Windows PowerShellscripting techniques
Dec 31, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Create File Names Based on Their Time Stamp?

ScriptingGuy1

Hey, Scripting Guy! How can I create a file name from the date? I have this application that creates a log file, and every hour I would like to save that log file as a file whose name is generated from the current time stamp. Can this be done?- RH Hi RH, Ever since I read your e-mail message, I have had this old Rolling Stones tune stuck in my h...

Scripting Guy!Windows PowerShellscripting techniques
Oct 16, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Create Passwords for My Users?

ScriptingGuy1

Hey, Scripting Guy! I am trying to create a bunch of users via script, but I am having problems dealing with their passwords. I do not want to give everyone the same password, and I do not want to have to manually create a hundred passwords and store them in a file, so I am nearly at a loss. I have seen some password generator programs on the Int...

Scripting Guy!Windows PowerShellscripting techniques