| T O P I C R E V I E W |
| learnwindows |
Posted - 11/09/2009 : 12:33:46 AM 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.
|
| 14 L A T E S T R E P L I E S (Newest First) |
| Xenophane |
Posted - 11/12/2009 : 09:13:03 AM No Problem, glad I could help... |
| learnwindows |
Posted - 11/12/2009 : 08:22:46 AM ThankQ. It got worked as you specified. you saved my day. Thanks again. |
| Xenophane |
Posted - 11/12/2009 : 07:41:31 AM With available drive I meant a drive letter that is not allready in use. (You can see which drives are in use i "My Computer")
What do you mean by "Is it shared n/w drive created in local machine." |
| learnwindows |
Posted - 11/12/2009 : 07:19:22 AM What is an Available drive. Is it shared n/w drive created in local machine. |
| Xenophane |
Posted - 11/12/2009 : 06:51:02 AM One thing you could try was to mount the share in your script..
Net Use x: \\\DestinationIP\<drive>$\Folder (Where x: is an available drive)
Then
xcopy "Source Machine" x: /d /y |
| learnwindows |
Posted - 11/12/2009 : 06:40:44 AM I am running under Administrator account only. The same i mention in case 2 of above reply. |
| Xenophane |
Posted - 11/12/2009 : 06:31:16 AM As CJ said, I think you need to check which account is running your scheduled job. You can change that under the settings of the scheduled task |
| learnwindows |
Posted - 11/12/2009 : 12:25:13 AM 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. |
| cj_berlin |
Posted - 11/09/2009 : 05:42:01 AM Can you redirect the output to a text file and see what xcopy's gotta say? |
| learnwindows |
Posted - 11/09/2009 : 04:05:11 AM Yes I am running the script under Administrator account who has all previlages. |
| cj_berlin |
Posted - 11/09/2009 : 03:50:10 AM 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. |
| learnwindows |
Posted - 11/09/2009 : 03:43:02 AM Thanks for ur reply. How to trobleshoot it. any ideas. My script is as follows
xcopy "Source Machine" "\\DestinationIP\<drive>$\Folder" /d /y
|
| cj_berlin |
Posted - 11/09/2009 : 03:08:05 AM 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. |
| Xenophane |
Posted - 11/09/2009 : 02:20:09 AM Here is a list of what exit codes mean
http://www.hiteksoftware.com/mize/Knowledge/articles/049.htm |