- Jun 6, 2010
- 286
- 5
- 81
New to Windows 7. I am not expert at DOS but I do know some, and long ago wrote my own little batch file to use xcopy to copy my most important files to a flash drive. I let XP schedule it. No idea if it is what a smart person would write for a script but it worked.
So I brought it over to the new box, and something is wrong, and I am stumped.
rmdir /s /q H:_saveold
move H:_save H:_saveold
mkdir H:_save
xcopy /S /q /H "C:Users\Fletcher\Documents\_save\" "H:_save\"
I keep the files in a _save directory, with subdirectories. Named with an underscore, it was at the top of the directory structure, which helps. So the idea is to do a sort of double-barrel backup -- I back up the old backup one time. So the script deletes the old backup directory, moves the backup directory to _saveold, then copies the files into a new _save directory.
The problem in Windows 7 is that it doesnt work the same way, I guess
C:>xcopy /S /q /H "C:Users\Fletcher\Documents\_save\" "H:_save\"
Invalid path
0 File(s) copied
I run it in a separate DOS window, same problem.
I took off the quotes [I used to need them because it was "My Documents".
I added *.* at the end
I tried it using My Documents
I tried it by moving the files to a new folder at C:testfolder and tried to copy from that. I tried to copy not to the flash drive but to C:testfolder2
all failed
Then I thought hey, lets see what Windows has for a backup. So I went through all that, which was not all that easy, I had to make a Library for the files, and then it did the backup, but the result was a backup object on the flash drive that I could restore the whole thing from. Not what I want. I want to be able to go in and fetch one file if I want, not restore and overwrite the whole library
Basically, I want to write a copy script, and I cant find how. I have googled for ideas, and no luck yet
Anyone?
So I brought it over to the new box, and something is wrong, and I am stumped.
rmdir /s /q H:_saveold
move H:_save H:_saveold
mkdir H:_save
xcopy /S /q /H "C:Users\Fletcher\Documents\_save\" "H:_save\"
I keep the files in a _save directory, with subdirectories. Named with an underscore, it was at the top of the directory structure, which helps. So the idea is to do a sort of double-barrel backup -- I back up the old backup one time. So the script deletes the old backup directory, moves the backup directory to _saveold, then copies the files into a new _save directory.
The problem in Windows 7 is that it doesnt work the same way, I guess
C:>xcopy /S /q /H "C:Users\Fletcher\Documents\_save\" "H:_save\"
Invalid path
0 File(s) copied
I run it in a separate DOS window, same problem.
I took off the quotes [I used to need them because it was "My Documents".
I added *.* at the end
I tried it using My Documents
I tried it by moving the files to a new folder at C:testfolder and tried to copy from that. I tried to copy not to the flash drive but to C:testfolder2
all failed
Then I thought hey, lets see what Windows has for a backup. So I went through all that, which was not all that easy, I had to make a Library for the files, and then it did the backup, but the result was a backup object on the flash drive that I could restore the whole thing from. Not what I want. I want to be able to go in and fetch one file if I want, not restore and overwrite the whole library
Basically, I want to write a copy script, and I cant find how. I have googled for ideas, and no luck yet
Anyone?
Last edited: