Click here for important information about

Batch file writing tutorial

Lenovo / Thinkcentret
January 7, 2010 at 11:56:37
Specs: Windows XP, 1.97GB
I need to write a batch file that will:

Prompt for day of week: MON, TUE, WED, THU, FRI
after I enter one from above, then it will go to the share drive and xcopy a directory and paste to whichever folder on my external drive it should, directories on the external will be named MON, TUE, WED, THU, FRI and will be automatically read only / archived as that is how this place is setup so I will want it to overwrite anything in that directory obviously, can you help?

OR maybe we could simply have the bat look for the date, create a directory on my external using the date naming convension and then copy the share directory to the external.

Please help I am an extreme Nauvice using Windows XP!

See More: Batch file writing tutorial

January 7, 2010 at 12:53:05
To make sure I understand this properly... You want to copy a
folder from your local disk to an external drive every weekday
into a folder matching the day's name? And each Monday,
you want to overwrite the previous Monday's contents?

It seems to me a batch file is a very inefficient way to do this.
Have you looked into the free backup programs that are

Regardless, you could do this:
md e:\%date:~0,3% && xcopy c:\mystuff e:\%date:~0,3% /e

Report •

January 7, 2010 at 12:56:47
The problem that I am finding is that it is from a share (network) not my PC to an external drive on my PC and the attributes default to read-only, I can remove them but then when I go back into the folder, it has the read-only attribute again. So I can't even rename/move the folders on the external to another naming convension prior to re-saving.

Report •

January 7, 2010 at 13:30:37
What do you mean the attribute is there again? It just comes
back without you doing anything?

Report •

Related Solutions

January 7, 2010 at 13:36:04
The read only attribut is back even though I have gone in and removed the checkbox and the dialog box has asked if I want this for all sub directorys/folders as well and I select YES and apply or ok and then go back into the file structure and viola it is back to read only.

Report •

January 7, 2010 at 13:39:54
I know that a backup program seems very efficient and quite easy to us, but the problem is so often that the person that makes the decisions is not I.T. savvy and they want this data immediately accessible so that parts of it can be quickly accessed and thrown onto a CD if necessary.

Report •

January 7, 2010 at 19:18:22
So in other words, the read-only attribute never really goes away,


attrib -r C:\Mystuff /s/d
from the command line.

Report •

Ask Question