| 1. |
Solve : Copy folders in a batch? |
|
Answer» I am trying to use a bat to backup some folders but it won't copy the folders, only the loose files in the main folder. How do I do this? "I had a discussion with George about new people walking by my office.doc" Xcopy will fail to copy a file if either the source or destination path and filename is, in total, more than 255 characters long. That lady needs educating. Sorry windows 2000 and yes I am working on getting her to shorten the names and not to use SYMBOLS (#$,&) she is getting there. Quote from: sukieb on August 23, 2008, 05:54:48 AM I am working on getting her to shorten the names and not to use symbols (#$,&) she is getting there. Symbols are BAD NEWS especiall the &, known as the "poison character" because of its disruptive effect. This person needs to to go on a "Use of IT" course. I figured it out! I am not sure why this works but what I used is: xcopy "c:\my documents\*" "h:\databackup\*" /m /e /y That copies the folder and their contents plus only those files she has changed since the last backup. My question is this -- will this take care of the error MESSAGE I get because of long file names? I think it should since those will already be copied and won't change because they are old files. how does that only copy files that have been modified since the last backup? /m copies files with archive attribute set. /e copies files and directories, even empty ones. and /y is default you don't need to add it. if you want to copy files that have been changed since a certain date try /d:m-d-y which copies copies files that have been changed on or after the date m-d-y. FB Quote from: sukieb on August 25, 2008, 10:09:42 AM
It's not just the file name length, but the total path length. They will not have been copied, and therefore the archive bit will still be set, and the message will RECUR. Quote from: fireballs on August 25, 2008, 10:17:16 AM how does that only copy files that have been modified since the last backup? Read the xcopy help again, fireballs. /M Copies only files with the archive attribute set, turns off the archive attribute. |
|