Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
You mean automatically, with a batch file? Use this:
@echo off
for /F "tokens=2-4 delims=/- " %%A in ('date/T') do md %%A%%B%%CThat should create a new directory under the current, with the current date as name, on the format MMDDYYYY. Swap the variables on the last part of the batch script above (%%A %%B and %%C) to change that format.
That method will only work on NT systems.
-- Leonardo Pignataro - Secret_Doom --
secre_doom@hotmail.com
www.batch.hpg.com.br____________________________________________________________________

Good answer!
But I would argue that all dates should be in the format yyyymmdd so they sort in the correct order when the year changes.
Nobody should ever in their lifetime for any reason put the year last.
Not to mention that the whole year should be given, not "03". I hope we learned something from the Y2K problem, but I doubt it. I see dates like this 05/14/03
Idiots!
:-) Mac

Yeah, I agree that the date format mm/dd/yyyy, used in US, is absolutely senseless. The formats yyyy/mm/dd, as you mentioned, or even dd/mm/yyyy are much more logic.
I just used such format on my example because it would be like the user system's date format (actually that method isn't 100% accurate and if the system date format is different than mm/dd/yyyy, the combo %%A%%B%%C will represent that different format, not mm/dd/yyyy).
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |