My solution is not generalized but it will remove two zeros following "scan"
in the filenames in a given directory. I think that solves this specific
problem. And it does it using only tools that ship with the OS.
At the cmdline:
dir /b /a-d >oldnames.txt
for /f %i in ('type oldnames.txt') do echo move %i x%i >>changem.bat
Then open changem.bat with Notepad, replace-all "xscan00" with "scan", and
save.
Run changem.bat.
And you can get rid of oldnames.txt and changem.bat when you're done, of
course.
--
Drew Cooper [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Scott Falkner" <(E-Mail Removed)> wrote in message
news:38e201c40140$edb5b5e0$(E-Mail Removed)...
> Is there a was to batch rename files, changing the length
> of the filename?
>
> I have a lousy scanner that can scan a lot of pictures in
> one go. The scans are
> named "scan0001.tif", "scan0002.tif", etc. This is
> uncongifurable (yes, the software for the lousy scanner is
> lousy). I would like to rename the
> files "01.tif", "02.tif", etc. I know I can enter DOS and
> rename the file with a RENAME" command, but I can't seem
> to change the length of the filename.
|