Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now