skipping files in use when copying nested folders

Posted on 2005-05-11
Medium Priority
Last Modified: 2010-04-14
When copying a folder with nested subfolders is there any way to just skip over any files that may be protected or in use. It seems like quite often when I go to do this, I get an error and the copying won't continue. I then have to find the file since the error message doesn't give me the location.
Question by:BobArnett
LVL 16

Accepted Solution

craylord earned 500 total points
ID: 13982920
I would use xcopy with the /c (continues if errors occur), /h (copy hidden), /e (copy everything including empty folders), /d (only copy file if source is newer than destination), /y (override). By typing xcopy /? in a ms-dos window it will explain all the variables and such. Very informative.

xcopy "source" "destination" /h /e /d /c /y
xcopy "%userprofile%\my documents\*" "d:\backup\my documents\" /h /e /d /c /y
xcopy "%userprofile%\desktop\*" "d:\backup\desktop\" /h /e /d /c /y
xcopy "%userprofile%\favorites\*" "d:\backup\favorites\" /h /e /d /c /y

xcopy "%userprofile%\my documents\*" "\\server\share\%username%\my documents\" /h /e /d /c /y

LVL 32

Expert Comment

ID: 13983900
I like the xcopy solution myself, but if you must use a GUI, see:



Author Comment

ID: 14029064
I would have liked the GUI utility but I couldn't get it to work. I'll probably write a small (WinBatch) script to run the xcopy command. Thanks for the tip.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
The article explains the process to deploy a Self-Service password reset portal I developed a few years ago. Hopefully, it will prove useful to someone.  Any comments, bug reports etc. are welcome...
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question