Computing.Net > Forums > Windows XP > Batch for creating new folders

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

Reply to Message Icon

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.

Thank you very much !!!!!!!!
Mariano



Sponsored Link
Ads by Google

Response Number 1
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.

Could you asses me this?

Thks,
Mariano


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch for creating new folders

Creating New Folder www.computing.net/answers/windows-xp/creating-new-folder/33163.html

New folder hotkey www.computing.net/answers/windows-xp/new-folder-hotkey/47000.html

cant create new folder in desktop www.computing.net/answers/windows-xp/cant-create-new-folder-in-desktop-/174879.html