I have to rename literally thousands of folders and want to use a script which adds "Old" in front of the old Name.
I tried this script
Get-ChildItem | rename-item -NewName { "Old+ $_.Name }
It even works when I try it in some small test folders to prevent messing up my main folder but unfortunally it's working there but not in my main folder. In my main folder this command will loop until it hits the character limit and stops.
Looks like this:
Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Zimmer.
Online i found this one too but it produces the same result
get-childitem | % { rename-item $_ "Old $_"}
Is it a bug or am I just stupid?