[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# XCOPY Routine

Posted on 2014-03-04
Medium Priority
254 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 71

Accepted Solution

Qlemo earned 2000 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 71

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

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
###### Suggested Courses
Course of the Month19 days, left to enroll