Hi everyone,
I need some help with a batch file im trying to write to mame the renaming of my Podcasts alot easier. I want to do this because in the dd-mm-yyyy format they do not sort properly by name.
The filename buildup is as follows:
"Always the same startpart"[space]dd-mm-yyyy.mp3 and i need it to be renamed to "Always the same start part"[space]yyyymmdd.mp3
All help is appteciated!
Ps. I do have some basic knowledge of batch and already have beennsearching for a bit now and still couldnt find it so i decided to post my question here.
Pps. Please forgive me any spelling mistakes because im kinda tired and its 05:40 here atm ^^.
Date conversion in filename from dd-mm-yyyy to yyyy-mm-dd
Moderator: DosItHelp
-
- Posts: 2
- Joined: 12 Mar 2011 22:32
Re: Date conversion in filename from dd-mm-yyyy to yyyy-mm-d
Code: Select all
for /f "delims=" %%a in ('dir /b *.mp3 ^|^
ssed.exe -n -R "s/^(.*\s)(\d\d)-(\d\d)-(\d{4})(\.mp3)$/ren \"\1\2-\3-\4\5\" \"\1\4\3\2\5\"/p"'
) do %%a
ssed.exe: http://sed.sourceforge.net/grabbag/ssed/sed-3.62.zip
-
- Posts: 2
- Joined: 12 Mar 2011 22:32
Re: Date conversion in filename from dd-mm-yyyy to yyyy-mm-d
Thank you very very much! That solved my problem !