Directory Name "Current Date"

G

Guest

I want to create a directory everyday via batch file, name must be same as
system current date.

I like Microsoft Newsgroups, Which provides to help me.

Thanks to Microsoft
 
P

Pegasus \(MVP\)

Asif Razzaq Attari said:
I want to create a directory everyday via batch file, name must be same as
system current date.

I like Microsoft Newsgroups, Which provides to help me.

Thanks to Microsoft

Try this:

md "c:\%date:/=-%"
 
J

Jerold Schulman

I want to create a directory everyday via batch file, name must be same as
system current date.

I like Microsoft Newsgroups, Which provides to help me.

Thanks to Microsoft


See tip 9905 » How can I generate a 14 digit year, month, day, hour, minute, seconds string for the current date / time?
in the 'Tips & Tricks' at http://www.jsifaq.com

In you batch:

call NowStr datetime
set Today=%datetime:~0,8%
MD %today%

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 

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