I'd go with PowerShell on this, in cmd it could be a little more complicated to achieve what you want.
$x = gci C:\yourpath | % { gi $_.FullName | rni -newname ($_ -replace "Slide","bbrd") }
In Detail:
- First it searches for all files inside the directory with
Get-ChildItem alias gci
- Then it will loop over each file with
foreach-object alias %
- Then it calls the Item by it's
fullname property with get-item alias gi
- The Item then gets passed into the pipeline and renamed by
rename-item alias rni
- Inside the
rni part, it replaces Slide with bbrd for the current object and will be saved with the new name.
to run this recursively if you have subfolders which also have files inside which need to be renamed, just add -r to your gci call and also add a filter to only target the files you want:
$x = gci C:\yourpath -r -filter *.bmp | % { [...] }
eis retained from the original file name. To do what you want will require quite complex scripting, unless you use a third-party renamer. – AFH Oct 13 '16 at 18:37$x = gci C:\yourpath | % { gi $_.FullName | rni -newname ($_ -replace "Slide","bbrd") }. if you have the files in folders and subfolders, search for files recursively and add-rto thegcicall – SimonS Oct 14 '16 at 10:48| %? – Shintaro Takechi Oct 14 '16 at 16:53