Hello,
how batch rename files in this format:
000_362 flames 4 small.bmp
000_363 flames 4 bigger.bmp
000_435 trees.bmp
013_435 trees.bmp
010_4728 palms&bushes.bmp
to:
362_000 flames 4 small.bmp
363_000 flames 4 bigger.bmp
435_000 trees.bmp
435_013 trees.bmp
4728_010 palms&bushes.bmp
?
How batch rename files
Moderator: DosItHelp
Re: How batch rename files
Untested:
Code: Select all
@echo off
for /f "tokens=1,2,* delims=_ " %%a in ('dir *.bmp /b') do ren "%%a_%%b %%c" "%%b_%%a %%c"
Re: How batch rename files
Great, works well. Thanks
Re: How batch rename files
doscode wrote:Hello,
how batch rename files in this format:
000_362 flames 4 small.bmp
000_363 flames 4 bigger.bmp
000_435 trees.bmp
013_435 trees.bmp
010_4728 palms&bushes.bmp
to:
362_000 flames 4 small.bmp
363_000 flames 4 bigger.bmp
435_000 trees.bmp
435_013 trees.bmp
4728_010 palms&bushes.bmp
?
Basically the same FOR loop concept you have used in all these previous threads. TOKENS and DELIMS.
http://www.dostips.com/forum/viewtopic.php?f=3&t=3457
http://www.dostips.com/forum/viewtopic.php?f=3&t=3435
http://www.dostips.com/forum/viewtopic.php?f=3&t=3422
http://www.dostips.com/forum/viewtopic.php?f=3&t=3421
http://www.dostips.com/forum/viewtopic.php?f=3&t=3383
Re: How batch rename files
Thanks so much... it works great!.
gw2 gold
gw2 gold