windows - Batch file to detect only part of a filename -
i need snippet of batch file can detect part of filename, rename it. note numbers after filename change randomly "file" same.
example:
filename: file143424
there 1 file needs renamed in folder. script delete older versions of file. instance, put first file inside folder , script in there too. run script, renames file. if put new file in, script, when run again, recognize "file" prefix , rename file after deleting old one.
excuse me. question incomplete, think. want rename "file134342" what?
in comment said: rename "file", works if there one file name. anyway, here is:
for %%f in (file*) ren %%f file
if not want, give more details (you showld give full details beginning).
Comments
Post a Comment