Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch for creating new folders
Name: Mariano Date: February 5, 2003 at 06:56:11 Pacific OS: WIN XP CPU/Ram: P2/310
Comment:
I'd like to know a command to create a directory (folder) with the date inserted. For example "backup 02-04-2003". Do you, wise guys, know how to write this in batch command?
If I'm asking sth impossible, at least tell me how to create a folder with different name each time a execute the BAT file.
Name: Gary Date: February 5, 2003 at 09:03:40 Pacific
Reply:
Here's how:
MOST IMPORTANT: In Regional options (control panel) your date separator must be set to "-" not to "/"
Here's the batch file line that makes the directory:
md "C:\BACKUP %DATE%\"
this will create a directory (folder) called BACKUP Wed 02-05-2003
If you don't change the date separator in control panel you will end up with 3 nested directories: C:\BACKUP Wed 02 -> \05 -> \2003 due to the syntax being the same.
0
Response Number 2
Name: Mariano Date: February 5, 2003 at 09:45:42 Pacific
Reply:
I've tried, but what I got was a new directory named "BACKUP%DATE%" !!!
Do you know another way Gary?
0
Response Number 3
Name: nickw23 Date: February 5, 2003 at 13:16:23 Pacific
Reply:
it worked for me. just copy and paste his statement:
md "C:\BACKUP %DATE%\"
0
Response Number 4
Name: Mariano Date: February 6, 2003 at 08:30:26 Pacific
Reply:
I won't work for me.
Perhaps it's beacause my system at this moment is Windows NT Workstation.
Summary: I need to know if it is possible to create a hotkey for creating new folders. nobody seems to have any info on this. any suggestions would be helpfull. ...