Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

XCOPY Routine

Posted on 2014-03-04
Medium Priority
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 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

One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. 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…
Suggested Courses
Course of the Month11 days, 5 hours left to enroll