Page 1 of 1

Bash rename files

Posted: 26 Oct 2011 15:00
by lamsen
hey,
so i was writing a lil script which encodes .flv from a folder to .mp3s and normalizes them.... so far so good!

now i wanted to rename the filename to a proper filename.

So the filename is (which ffmpeg.exe creates):
Kate Ryan - LoveLife Video tape.tv.flv.mp3 (<-mp3 is obviously the file ending)

and i want it to be to just the Artist - Title aka
Kate Ryan - LoveLife

for some reason i just dont get it... for %%i doesnt seem to work with set...

heres the code:

Code: Select all

for %%i IN (*.flv) DO (
ffmpeg.exe -i "%%i" -vn -aq 0 "%%i".mp3
del "%%i"
)
mp3gain.exe sweep mp3gain /r *.mp3
pause


anybody knows?

Re: Bash rename files

Posted: 13 Nov 2011 10:01
by Cat
Try REN

Code: Select all

ren "Kate Ryan - LoveLife Video tape.tv.flv.mp3"  "Kate Ryan - LoveLife.mp3"