PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 CMD Promt Make Directory With Name As Date

Reply

Make Directory With Name As Date

 
Thread Tools Rate Thread
Old 10-07-2003, 12:37 AM   #1
Daniel Key
Guest
 
Posts: n/a
Default Make Directory With Name As Date


I have a batch file that is ran daily and I need to be
able to create a new directory every time it is ran. I
want the directory to automatically be name as that day's
date mm/dd/yyyy. I have searched for such a command but
cannot seem to find it. Can anyone help on this matter.

Thanks,

Daniel
  Reply With Quote
Old 10-07-2003, 01:11 AM   #2
Phil Robyn
Guest
 
Posts: n/a
Default Re: Make Directory With Name As Date

Daniel Key wrote:

> I have a batch file that is ran daily and I need to be
> able to create a new directory every time it is ran. I
> want the directory to automatically be name as that day's
> date mm/dd/yyyy. I have searched for such a command but
> cannot seem to find it. Can anyone help on this matter.
>
> Thanks,
>
> Daniel


set zdate=%date:~4%
set zdate=%zdate:/=-%
if not exist \%zdate% md \%zdate%

--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l

  Reply With Quote
Old 10-07-2003, 01:28 AM   #3
Daniel Key
Guest
 
Posts: n/a
Default Re: Make Directory With Name As Date


>-----Original Message-----
>Daniel Key wrote:
>
>> I have a batch file that is ran daily and I need to be
>> able to create a new directory every time it is ran. I
>> want the directory to automatically be name as that

day's
>> date mm/dd/yyyy. I have searched for such a command

but
>> cannot seem to find it. Can anyone help on this matter.
>>
>> Thanks,
>>
>> Daniel

>
>set zdate=%date:~4%
>set zdate=%zdate:/=-%
>if not exist \%zdate% md \%zdate%
>
>--
>Phil Robyn
>Univ. of California, Berkeley
>
>u n z i p m y a d d r e s s t o s e n d e - m a

i l
>
>.
>

  Reply With Quote
Old 10-07-2003, 01:29 AM   #4
Daniel
Guest
 
Posts: n/a
Default Re: Make Directory With Name As Date

Thank You!!!!!!



>-----Original Message-----
>Daniel Key wrote:
>
>> I have a batch file that is ran daily and I need to be
>> able to create a new directory every time it is ran. I
>> want the directory to automatically be name as that

day's
>> date mm/dd/yyyy. I have searched for such a command

but
>> cannot seem to find it. Can anyone help on this matter.
>>
>> Thanks,
>>
>> Daniel

>
>set zdate=%date:~4%
>set zdate=%zdate:/=-%
>if not exist \%zdate% md \%zdate%
>
>--
>Phil Robyn
>Univ. of California, Berkeley
>
>u n z i p m y a d d r e s s t o s e n d e - m a

i l
>
>.
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off