Powershell: Change filename abcd-123.pdf to 123-abcd.pdf


i have folder 1000 files named in format: abcd-123.pdf. allow these files organized correctly according 3-digit number (ie. "123"), have change filenames format 123-abcd.pdf.

i've never used powershell before searching online answer question last friday. appreciate sort of advice or guidance either set me in right direction or tell me answer. cheers! thank you!

i'm also a bit puzzled works without losing extension.  seems to.  here's output:

what if: performing operation "rename file" on target "item: c:\scripts\abcd-123.pdf destination: c:\scripts\123-abcd.pdf".

what's up?

grant ward, a.k.a. bigteddy




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file