There might be a better approach, but my file names are in this format: name_Sat Apr 11 031806 2015.mp3 (with the spaces)
In order to merge them I need to put them in order, ie. 001, 002, 003. etc.
I currently use this code to move them to a folder on the end of the each day:
@echo off
for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined MyDate set MyDate=%%x
:: variables
set SRCFOLDER=C:\srcfolder
set DESTFOLDER=C:\destfolder
set today=%MyDate:~0,4%-%MyDate:~4,2%-%MyDate:~6,2%
set backupcmd= /MOV
robocopy "%SRCFOLDER%" "%DESTFOLDER%\%today%" %backupcmd%
That produces a new folder named YYYY-MM-DD and the files are put there. I will merge them with another program, but I need to have them in a sequence by the time they were created (the time in the filename).
So the question is - How do I do that?
Thanks
Aucun commentaire:
Enregistrer un commentaire