filename change

3x0088

New Member
I'm very new to this program and haven't done any programming in over 15 years, needless to say things have changed. I have over 400 files that have a %20 in the filename that I have been trying to take out. I found a code on this forum posted on 10-15-08 that worked when I used the whatif statement at the end. Below is the code:

gci -rec | ? {-not $_.psiscontainer -and $_.name.Contains("&")} | % {rename-item $_.fullname -newname ($_ -replace "&","and") -whatif}

When I take out the -whatif the system returns to >> and no matter what I type afterwards nothing happens. What the heck am I doing wrong? I wanted the &20 to be a space.

Nevermind wrong group sorry :(
 
Last edited:

My Computer

Back
Top