Solved

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

Posted on 2008-10-29
3
4,711 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

689 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