I have several configuration files on Windows Server 2008 attached as follows:
C:\Projects\Project_1\project1.config C:\Projects\Project_2\project2.config
In my configuration, I need to perform a line replacement as follows:
<add key="Environment" value="Dev"/>
will become:
<add key="Environment" value="Demo"/>
I was thinking about using a batch script, but there was no good way to do this, and I heard that with PowerShell scripts you can easily do this. I found find / replace examples, but I was hoping for a way to traverse all the folders in my C: \ Projects directory and find any files that end with the .config extension. When he finds one, I want him to replace my string values.
Any good resources to learn how to do this, or any PowerShell gurus that might offer some insight?
scripting replace find powershell
Brandon May 14 '10 at 9:36 p.m. 2010-05-14 21:36
source share