Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
I am in the process of searching for an existing tool or writing my own. I've even considered writing it a powerful scripting language; PowerShell comes to mind. If you were to use a powerful script or application; what would it be? Also, command line option is preferred, if possible.

Also, another nice nicety would be able to create a backup of the file prior to making the change.

What I have tried:

gci C:\Projects *.config -recurse | ForEach {
  (Get-Content $_ | ForEach {$_ -replace "old", "new"}) | Set-Content $_ 
}


I want something fast and minimal. Nothing fancy.
Posted
Updated 3-Apr-17 12:33pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900