Solved

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

Posted on 2008-10-29
3
4,621 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
[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
  • Learn & ask questions
  • 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

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Suggested Solutions

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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