Hi All I am new to windows concepts. I have created simple batch file to copy backup files from production server(window server 2003 Enterprice) to Dev Server(window server 2003 Developer) and scheduled it in Prod Server daily twice. But when i see log showing "Result: The task completed with an exit code of (4)." or "Result: The task completed with an exit code of (1).". What does it mean? How to analyze Exit codes. and its working when i manually first connect to Dev from Prod in file share mode and runs the batch file. plz. guide me.
Most probably the security context the script is scheduled to run in haven't got access to remote server - OR you are using mapped drives in your script and the user account the script runs as doesn't map them in its login script.
So you need to determine what user this script runs under and either change that to something that has write access to the destination share or give the account the script is scheduled as that access.
I have tested my batch script in two different ways. 1.Initailly i ran without connecting to another server neither remotely nor file sharing mode then my script writes output as "0 files copied". 2.In this case first i connected to another machine via file sharing to specified directory from cmd prompt as "\\serverip\F$\MySecondaryBackupsFolder" Then i ran the script of XCopy then all new files copied successfully. I think in first case its not finding the secondary server direcory. But as i made it as windows schedular everytime i cannot connect to secondary server and run the script. Could you plz. guide me as i dont have windows knowledge much. Thankx.