Make Directory With Name As Date

D

Daniel Key

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
 
P

Phil Robyn

Daniel said:
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%
 
D

Daniel Key

-----Original Message-----


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

.
 
D

Daniel

Thank You!!!!!!


-----Original Message-----


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

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top