Forum Discussion
Shree2280
Mar 09, 2021Brass Contributor
find and replace from folders, subfolders
Hi Expert,
I am trying to find and replace from folders and subfolders files etc .presently i can do it to one folder only
Get-ChildItem D:\Check\*.config | Foreach {(Get-Content $_) -replace '22.10.','SQL1'| Set-Content $_}
how i can i do it for multiple subfolders.i.e
afolder-afolder,bfolder--cfolder so on
Regards
Shree
1 Reply
- farismalaebIron Contributoradd the -Recurse parameter for the Get-ChildItem
Get-ChildItem C:\Windows\*.config -Recurse