Reputation: 24488
I am trying to create BAT file to run WS_FTP PRO wsftppro.exe command line using Connection Configuration. I save Connection Configuration is working in the UI, however, when trying to call it in windows command prompt it fails.
"c:\Program Files (x86)\Ipswitch\WS_FTP 12\wsftppro.exe" -s "local:c:\FTP\CLIENT\CLIENTS.C0000" -d "CJ PRODUCTION UPLOAD:INTAKE.UP.CLIENTS.C0000"
Error log: Use MVS Dsname conventions
I have also tried using single quotes:
"c:\Program Files (x86)\Ipswitch\WS_FTP 12\wsftppro.exe" -s "local:c:\FTP\CLIENT\CLIENTS.C0000" -d "CJ PRODUCTION UPLOAD:'INTAKE.UP.CLIENTS.C0000'"
Error log: Remote path not found
How can create a BAT file to run WS_FTP PRO wsftppro.exe command line using Connection Configuration?
Upvotes: 1
Views: 325
Reputation: 24488
The single quote is required for the remote dir path to be valid. The single quote is only used once, no closing single quote.
-s "local:c:\FTP\CLIENT\CLIENTS.C0000" -d "CJ PRODUCTION UPLOAD:'INTAKE.UP.CSSCE.CLIENTS.C0000"
Powershell code to run it:
$args = @"
-s "local:c:\FTP\CLIENT\CLIENTS.C0000" -d "CJ PRODUCTION UPLOAD:'INTAKE.UP.CSSCE.CLIENTS.C0000"
"@
Start-Process "c:\Program Files (x86)\Ipswitch\WS_FTP 12\wsftppro.exe" $args
Upvotes: 0