Bash rename files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
lamsen
Posts: 1
Joined: 26 Oct 2011 14:55

Bash rename files

#1 Post by lamsen » 26 Oct 2011 15:00

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?

Cat
Posts: 32
Joined: 11 Nov 2011 12:04

Re: Bash rename files

#2 Post by Cat » 13 Nov 2011 10:01

Try REN

Code: Select all

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

Post Reply