Note : question regarding Windows shell
I want to write a simple batch script to create a folder name is it does not exist with the system date as the name of the folder.
Current system date :
$ date /t
Sat 09/10/2011
I want the folder name to be created in the format dd-mm-yy and in the C:\ dir 10-09-11
First I tried according to this (Link to microsoft doc for date)
$ date dd-mm-yy /t
this was supposed to get me the date in the format I wanted but instead it just returned the same format as above.
To make the dir I tried
$ mkdir "%date dd-mm-yy /t%"
and many such variations with no success.
I just want to create a folder name with the system date in format dd-mm-yy, It would be good if I can have the folder name in a variable as I need to use it to copy files into this folder later in the batch script
Can anyone help me out?