on 01-16-2015 2:26 PM
Hi Gurus,
I am getting an error while running a script:
This script is for moving a file in a different server from one folder to another(Windows).
308 | 15324 | RUN-050306 | 1/16/2015 8:55:12 AM | |Session JOB_TEST_ARCHIVE|Function exec |
308 | 15324 | RUN-050306 | 1/16/2015 8:55:12 AM | Function <exec> failed to execute program <cmd move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed>. Program terminated with |
308 | 15324 | RUN-050306 | 1/16/2015 8:55:12 AM | exit code <1>. |
308 | 15324 | RUN-050304 | 1/16/2015 8:55:12 AM | |Session JOB_TEST_ARCHIVE |
308 | 15324 | RUN-050304 | 1/16/2015 8:55:12 AM | Function call <exec ( cmd, move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed, 0 ) > failed, due to error <50306>: |
308 | 15324 | RUN-050304 | 1/16/2015 8:55:12 AM | <Function <exec> failed to execute program <cmd move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed>. Program terminated |
308 | 15324 | RUN-050304 | 1/16/2015 8:55:12 AM | with exit code <1>.>. |
308 | 15324 | RUN-053008 | 1/16/2015 8:55:13 AM | |Session JOB_TEST_ARCHIVE |
308 | 15324 | RUN-053008 | 1/16/2015 8:55:13 AM | INFO: The above error occurs in the context <|Session JOB_TEST_ARCHIVE|exec(...) Function Body|>. |
308 | 15324 | RUN-050306 | 1/16/2015 8:55:13 AM | |Session JOB_TEST_ARCHIVE|Function exec |
308 | 15324 | RUN-050306 | 1/16/2015 8:55:13 AM | Function <exec> failed to execute program <cmd move Z:\DSIS\CUSTOMER*.* Z:\Archive\CUSTOMER\Processed>. Program terminated with |
308 | 15324 | RUN-050306 | 1/16/2015 8:55:13 AM | exit code <1>. |
Please help in the above Error. I have pasted the error Log.
Thanks in Advance,
DJ
Please try to create a .bat file in the server using notepad with your command line. Just try to move a sample flat file once by executing/double click the .bat file.
As shown in the below script am triggering a move.bat by using script at the end of the DF.
I think this should work for you.
Files moved successfully.
Regards,
Akhileshikiran,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akhilesh Kiran,
Firstly thanks a lot for giving you time from your buzy schedule.
Actually I tried with the Batch JOB after reading your reply, unfortunately it didn't worked for me.
Can you please help me with some other example.
Regards,
DJ
Hi Akhilesh Kiran,
Thanks a lot for your wonderful support proud to have a friend like you.
Thanks & Regards,
DJ
Check if you have customer*.* files in source folder. If you dont have it ,move cmd will give error.To overcome that use something like exec('cmd','move source target',8). Your syntax is right just add ,8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Magesh,
Thanks for your valuable time:
Below is the script and Z:\ is a Temprorary Drive( As this folder is present in some different server so we are making it as a temprorary drvie)
exec('cmd','move Z:\XYZ\LBX\T*.* Z:\XYZ\CCC\Processed');
print('Moving the files to Archived UnProcessed folder');
Thanks in Advance,
DJ
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.