troubleshooting Question

How to ensure 'xcopy' completed and successfully in Perl script?

Avatar of yc_yc
yc_yc asked on
Windows 2000PerlWindows OS
8 Comments1 Solution2402 ViewsLast Modified:
I use 'xcopy' to copy directory trees and files to another archiving server.
Before I use 'rd' to remove directories and all contents, I have to ensure the
'xcopy' completed and successfully, which means it didn't have any missing
or corrupted archive files during 'xcopy'.  How to verify the 'xcopy' successfully
to avoid data loss before doing 'rd' in Perl script?

system("xcopy $originalDataDir $archiveFolder /e /y /i /k /q");
system("rd /s /q $originalDataDir");
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros