Solved

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

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SolarWind and DNS Server 12 87
How computer Arp Table gets populated. 21 117
Linksys 4 port wireless router 62 60
Disabling energy efficient ethernet on all hardware models 6 65
Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 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