Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

changing string in XML files in multiparty folders

$
0
0

Hi,

 

I have folders and sub-folders, I need to fine all XML files in the folders and change a string in every file "XYZ" to "ABC".

I wrote this lines:

# set folder path

$path = "C:\temp\" 

Get-ChildItem $path -Recurse | where {$_.extension -eq ".xml"} | Get-Content | % { $_.Replace("XYZ", "ABC") } | Set-Content

 

this is not working, I get an error: "Set-Content : The input object cannot be bound because it did not contain the information required to bind all mandatory parameters:  Path"

Need help,

 

Thanks

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles