WS_FTP PRO wsftppro.exe command line using Connection Configuration

153 Views Asked by At

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?

1

There are 1 best solutions below

0
Ravi Ram On

The single quote is required for the remote dir path to be valid. The single quote is only used once, no closing single quote.

enter image description here

-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