Solved

# XCOPY Routine

Posted on 2014-03-04
241 Views
Hello Experts,  I am currently running an xcopy routine to back up files from my server to another machine.  However when it copy's the files from one directory it only copy's about half of the directories contained in that folder.  The directory with the problem is called home.  Attached is the xcopy script that I am running.  Any ideas as to why it only copies some of the directories would be greatly appreciated.  Thanks!
xcopy \\PSIDC1\PSI\data\access\*.md? \\PSIBACKUP\psi\data\access\ /y/s/h/d
xcopy \\PSIDC1\HR\data\access\*.md? \\PSIBACKUP\psi\data\access\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\access2003\*.md? \\PSIBACKUP\psi\data\access2003\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\labels\*.* \\PSIBACKUP\psi\data\LABELS\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\Word\*.* \\PSIBACKUP\psi\data\Word\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\excel\*.* \\PSIBACKUP\psi\data\excel\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\powerpoint\*.* \\PSIBACKUP\psi\data\powerpoint\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\Project\*.* \\PSIBACKUP\psi\data\project\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\QS9000\*.* \\PSIBACKUP\psi\data\QS9000\ /y/s/h/d
xcopy \\PSIDC1\PSI\data\Visio\*.* \\PSIBACKUP\psi\data\Visio\ /y/s/h/d
xcopy \\PSIDC1\PSI\\dataFAMS\*.* \\PSIBACKUP\psi\data\FAMS\ /y/s/h/d
xcopy \\PSIDC1\PeachTree\*.* \\PSIBACKUP\psi\data\pca\ /y/s/h/d
xcopy \\PSIDC1\PSI\msoffice\*.* \\PSIBACKUP\psi\msoffice\ /y/s/h/d
xcopy \\PSIDC1\Home\*.* \\PSIBACKUP\psi\home\ /y/s/h/d
xcopy \\PSIDC1\Pca_new\*.* \\PSIBACKUP\psi\data\pca_new\ /y/s/h/d
attrib -a \\PSIBACKUP\psi\*.* /s/d

0
• 4
• 2

LVL 69

Accepted Solution

Qlemo earned 500 total points
ID: 39903535
Firstly, you should stop using XCopy and try to migrate to RoboCopy, which is part of the OS since XP now. It's much more robust against issues, and allows for better control.

When using XCopy you should add the /c switch to continue after errors. Otherwise XCopy stops as soon as it hits e.g. locked or protected files.
0

Author Comment

ID: 39903539
Thank you Expert but I am not sure what a "code block" is.
0

Author Closing Comment

ID: 39903566
Great answer!!!  I am working on the Robocopy script right now!!!  Thanks!!!
0

Author Comment

ID: 39903640
I tried rerunning the xcopy routine and when it attempted to do the home directory I received a insufficient memory error.  What to I need to add to prevent this from happening?  Thanks
0

LVL 69

Expert Comment

ID: 39903865
Probably that is a result of circular links in the home directory, generating extensive long paths. I cannot think of a way to prevent from following those links. RoboCopy should not have that issue.
0

Author Comment

ID: 39904097
Thanks for the explanation!
0

## Featured Post

Question has a verified solution.

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

### Suggested Solutions

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…