Gentlemen,
Firstly, DOS batch files aren't my stong point, so bear with me!
I have set up a batch file which can be executed from the desktop to automate the back-up a number of folders in various locations on the C: partition to another, safer location, for when I replace an image of C:, which I do fairly regularly. (Kids!!)
With most situations there is no problem - backing up the IE favorites is simple enough, as is the e-mail folder, along with a few others.
The problem I'm having is where a folder might have sub-directories, in this case the 'My Documents' folder.
The following shows a snippet of code, but I'm finding that any sub-directories seem to be ignored, and only files within the main folder are copied, not directories:
DELTREE /Y D:\BACKUPS\MYDOC1
MKDIR D:\BACKUPS\MYDOC1\
XCOPY C:\MYDOCU~1\ D:\BACKUPS\MYDOC1\
I'd appreciate any pointers as to why directories aren't being copied, and indeed if it is possible.
The second line seems to be unneeded in practice - I'd appreciate comments on this too.
Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
Hot Fusion
Firstly, DOS batch files aren't my stong point, so bear with me!
I have set up a batch file which can be executed from the desktop to automate the back-up a number of folders in various locations on the C: partition to another, safer location, for when I replace an image of C:, which I do fairly regularly. (Kids!!)
With most situations there is no problem - backing up the IE favorites is simple enough, as is the e-mail folder, along with a few others.
The problem I'm having is where a folder might have sub-directories, in this case the 'My Documents' folder.
The following shows a snippet of code, but I'm finding that any sub-directories seem to be ignored, and only files within the main folder are copied, not directories:
DELTREE /Y D:\BACKUPS\MYDOC1
MKDIR D:\BACKUPS\MYDOC1\
XCOPY C:\MYDOCU~1\ D:\BACKUPS\MYDOC1\
I'd appreciate any pointers as to why directories aren't being copied, and indeed if it is possible.
The second line seems to be unneeded in practice - I'd appreciate comments on this too.
Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
Hot Fusion