batch rename files in subfolders to diff name

December 14, 2009 at 13:21:11
Specs: Windows Vista
ok i have:
.tvdb main folder
/actors/random#.jpg
/fanart/random#.jpg
/posters/random#.jpg
/seasons/random#.jpg

each subfolder usually has 5-10 pics, i need up to 6.

i'm trying to get all images in each subfolder to be renamed to something specific.
so, in actors=actor1, actor2...
in fanart=backdrop1, backdrop2
posters and seasons would be folder1, folder2.
is this possible?


See More: batch rename files in subfolders to diff name

Report •


#1
December 15, 2009 at 15:13:11
Needs further work being done, but something like this:

script "example_sub.cmd":
-------------------------------------------------------
@echo off

set p_file=%1
set p_file_name=%2
set p_file_ext=%3

set /a var=%var%+1
echo rename %p_file% %p_file_name%%var%%p_file_ext%
-------------------------------------------------------

Then call with :
set var=0
for %f in (*.txt) do call example_sub.cmd %f %~nf %~xf


Report •
Related Solutions


Ask Question