Hi,
how can I hand over the work.file to a receiving .bat file?
The batch file should execute a simple copy command and return an error code.
Thanks!
Patrick
Patrick,
please create a batch file that works with command line parameters, e.g. the file "mybatch.bat":
copy %1 c:\mybackupdir\%1.edi
Then navigate to the partner management (events) and enter a call to this script with parameters:
cmd /c mybatch.bat ${filename}
At runtime the parameter ${filename} will be replaced with the real filename. A list of available replacements could be seen in the event panel.
${filename}
Regards
Thank you for that fast reply.
But I got the following error message:
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1: Executing shell command after receipt for payload. [10:55:53 AM] 20111027105552.21335.1314@txcrostage1: Shell command: "cmd /c C:\mendelson\opensource\as2\scripts\BackupScript.bat $filename". [10:55:53 AM] 20111027105552.21335.1314@txcrostage1: Shell command executed, returncode=0. [10:55:53 AM] 20111027105552.21335.1314@txcrostage1 [Shell]:
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1 [Shell]:C:\mendelson\opensource\as2>copy $filename C:\Datenuebertragung\Backup\$filename.edi
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1 [Shell]:Das System kann die angegebene Datei nicht finden.
please use the variables in the format "${varname}" instead of "$varname".
Patrick,
please create a batch file that works with command line parameters, e.g. the file "mybatch.bat":
copy %1 c:\mybackupdir\%1.ediThen navigate to the partner management (events) and enter a call to this script with parameters:
cmd /c mybatch.bat ${filename}At runtime the parameter
${filename}will be replaced with the real filename. A list of available replacements could be seen in the event panel.Regards
Thank you for that fast reply.
But I got the following error message:
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1: Executing shell command after receipt for payload.
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1: Shell command: "cmd /c C:\mendelson\opensource\as2\scripts\BackupScript.bat $filename".
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1: Shell command executed, returncode=0.
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1 [Shell]:
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1 [Shell]:C:\mendelson\opensource\as2>copy $filename C:\Datenuebertragung\Backup\$filename.edi
[10:55:53 AM] 20111027105552.21335.1314@txcrostage1 [Shell]:Das System kann die angegebene Datei nicht finden.
Patrick,
please use the variables in the format "${varname}" instead of "$varname".
Regards