cmd - Windows scripting FOR command to rename all files in a directory -
i trying rename files present in windows directory using for command follows @ command prompt:
for %1 in (*.*) ren %1 test%1
e.g. renames file enc1.ctl testenc1.ctl enc2.ctl testenc2.ctl
thats not want. want enc1.ctl renamed test1.ctl enc2.ctl renamed test2.ctl
how do that?
@akelunuk: thanks, w kind of works have files names
h263_enc_random_pixels_1.ctl , h263_enc_random_pixels_2.ctl want rename to
test1.ctl , test2.ctl respectively
then how?
if know number of files, (say 10), can use
for /l %1 in (1,1,10) ren enc%1.ctl test%1.ctl
Comments
Post a Comment