I'm trying to add the word [Replay] to all mp3 files in a folder using a batch file like so:
@echo off
for %a in (c:\folder\*.mp3) do ren %a [Replay]%a
But it wont rename the files.
all the examples i tried from googling appends the word but runs over the next characters in the filename, i just need to add the word to the start without running letters over.
Any thoughts?
forthat behaves differently. It doesn't read the directory contents at once, so it effectively finds renamed files twice. – Dennis Dec 30 '12 at 18:33for /f "eol=: delims=" %%a in ('dir /b *.mp3') do .... I added EOL=: to guard against file names that start with;, though I doubt you will ever run into one :) – dbenham Dec 30 '12 at 19:37