Re: Making a directory with a date?
Unfortunately the author of this page got things somewhat confused.
He wrote that the command should look like so in a batch file:
echo md %%date:~-4,4%%\%%date:~-10,2%%\%%date:~-7,2%%
whereas in "DOS" it should look like so:
echo md %date:~-4,4%\%date:~-10,2%\%date:~-7,2%
There are two problems here:
a) There is no DOS under Windows, only the Command Prompt.
b) The first command is wrong. The second command is correct,
both in a batch file and in a Command Prompt.
You could also use this syntax, giving you a somewhat different result:
echo md "%date:/=%"
"j9" <j9@1aprop.com> wrote in message
news:fhcpuj$nfc$2@news.al.sw.ericsson.se...
> Take a visit to
> http://blog.209software.com/2004/10/dos-batch-file-fun-creating.html .
> This
> will show you how to make dated directories of all sorts...
>
>
> "Jim" <stopspam@redmond.com> wrote in message
> news:uoOTawhJIHA.3848@TK2MSFTNGP05.phx.gbl...
>> Using Windows XP or Win 2003 Server.
>> Is there a way to make a batch file that will create a new folder with
>> the
>> date?
>>
>> For example, if it were this easy....,
>> MKDIR %DATE% would make a directory 11-13-2007
>>
>> Thanks.
>>
>>
>
>