Create directory with current date

Hi,

I'm trying to create a directory with the name as the current date in format yyyymmdd, can anybody tell me how to do this?

Thanks
ChristopheLamarliereAsked:
Who is Participating?
 
For-SoftConnect With a Mentor Commented:
You can find solution here:
http://www.experts-exchange.com/Operating_Systems/MSDOS/Q_21081302.html

Or, you can use %DATE% variable with substring syntax:
%DATE:~0,2%
To see details use SET /?
0
 
For-SoftCommented:
What operating system are you using?
0
 
ChristopheLamarliereAuthor Commented:
XP Pro
0
 
shanekelly_7Connect With a Mentor Commented:
Here it is In Batch Script:-

::-------Start of Code--------::
@echo off
set y=%date:~-4%
set m=%date:~3,2%
set d=%date:~0,2%
set a=%y%%m%%d%
mkdir C:\<Path>\%a%
::----------End of Code-------::
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.