Solved

0x4 error after running xcopy as a scheduled task on a Windows Server 2003 machine

Posted on 2008-10-29
3
4,475 Views
Last Modified: 2012-05-05
Had a batch file that copied a large file overnight from 1 server to another. Ran perfectly every night.  Moved the destination folder to another drive (E: rather than D:) on the destination server and changed the batch file accordingly. Now every time the batch file runs it finishes with a 0x4 error - "Started 16/10/2008 22:05:00 - "moveexbk.job" (moveexbk.bat)
      Finished 16/10/2008 22:05:17       Result: The task completed with an exit code of (4)."

Any ideas?
0
Comment
Question by:CharAp
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Shift-3
ID: 22831388
If E: is a network drive then use the UNC path (e.g. \\server\share) rather than the drive letter.

You can capture error messages to a file by appending something like 2>>c:\copyerrors.txt to your xcopy command in the batch script.  See here for more information:
http://www.ss64.com/ntsyntax/redirection.html
0
 

Author Comment

by:CharAp
ID: 22849336
The batch file does use UNC syntax, I was just explaining what I had done re moving the folder. The actual batch file uses UNC.
0
 

Accepted Solution

by:
CharAp earned 0 total points
ID: 23067612
Changed backup routine back to use D: and all works. Don't really see where the problem was with moving to E:  but problem worked around...
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

806 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