Solved Need to rename mult similar files in a folder

November 2, 2011 at 05:46:43
Specs: Windows XP
Example:
xxxx123.asc, xxxx124.asc, xxxx125.asc need to end up Y123, Y124, Y125 (no extension).Needs to be incorporated into a batch file

See More: Need to rename mult similar files in a folder

Report •


#1
November 2, 2011 at 08:26:10
✔ Best Answer
setlocal EnableDelayedExpansion
pushd Your_Directory
for %%j in (*.asc) do (
  set file=%%~nj
  ren %%j Y!file:~4!
)
popd
endlocal


Report •

#2
November 2, 2011 at 11:11:54
Exactly what I needed! Thanks a lot!

Report •
Related Solutions


Ask Question