|Hello, I am trying to write a batch file that will enable me to remove parts of several file names.|
i.e. Led-Zeppelin_Led-Zeppelin-IV_Black Dog.mp3 changes to Black Dog.mp3
I would like the prefix to be user input when the batch file runs.
What I have so far seems to work, but the files don't actually rename. I am thinking it may be a Vista problem, or do I have a code error?
set /p PREFIX=Input the part of the file name to remove:
for %%* in (%prefix%*.*) do (
REN %%~fx* !name:%prefix%=!
echo Done & pause