Friday, March 21, 2014

Powershell mass rename part 2

I ran into a issue where I had to parse multiple folders looking for and replacing old_text.  Well the -recurse helped, just make sure you are in the top level folder you want to parse through.


get-childitem -recurse *.txt | foreach { rename-item $_ $_.Name.Replace("old_text", "new_text") }

No comments: