I came across a very irritating issue today. When doing an import of HD videos using Panasonic’s HD Writer AE, it automatically puts all the files into folders named with a format DD-MM-YYYY (47 of them!).
This would all be fine if Windows realised this was a date, instead of sorting into order by the DD first, but it doesnt. I wasnt about to go through and manually rename all the directories to YYYY-MM-DD so they would sort correcty, so I wrote a quick batch file to do it, and thought it may be of use to some people.
Copy the below into a text file, edit the year (currently 2010) as required, rename to .bat and drop it into the root folder you want to rename the other directories from, then simply double click!
@echo off
@echo This batch file will reverse date formats for any folders in the current dir from DD-MM-YYYY to YYYY-MM-DD
pause
for /D %%i in (*-*-2010) do (
call :renamer %%i
)
pause
goto :EOF
:renamer
set var=%1
ren %1 2010-%var:~3,2%-%var:~0,2%
