In this case the following batch file could be the right solution: offįor /F "eol=| delims=" %%I in ('dir *_?_*.wav /A-D-H /B /ON 2^>nul') do (įor /F "eol=| tokens=1,2* delims=_" %%A in ("%%~nxI") do ( Move /Y "%%I" "BL_C1234-!FileNumber!_abc%%~xI" >nulīut what about string left to first underscore and string right to second underscore vary from file name to file name? Setlocal EnableExtensions EnableDelayedExpansionįor /F "eol=| delims=" %%I in ('dir BL_?_abc.wav /A-D-H /B /ON 2^>nul') do ( Let us assume C1234- in new file name is a fixed sequence of characters and 1 and 5 is a number incremented by one on each renamed each file. And Total Commander supports even an undo if the rename operation fails for some reason. This file rename operation could be done with Total Commander nearly complete using only some mouse clicks, just C1234- need to be typed on keyboard. I would do such a multi-rename operation of files using shareware Total Commander with its built-in multi-rename tool which has a every easy to use graphical user interface for such tasks making it possible to review the new names of the files before executing the rename operation.
0 Comments
Leave a Reply. |