Hi, thanks a lot, Sidewinder! I do get a date string "2006-09-12" with a revised version of your command:
FOR /F "TOKENS=1-3 DELIMS=/ " %I IN ('DATE /T') DO ECHO %K-%J-%I > DATE.TXT
Now I want to create a folder using the date string as the folder name, since the name rule is 8.3 format, so I need to use 8 digits for the name, better use "06-09-12", how can I chop off "20" in the head of string?
I have tried to use delims=/0, but not successful, it will appear "6-9-12".