I'm attempting to run a batch script with a block of commands using /command
WinSCP /ini=nul /command "open sftp_VENDOR_CUSTOMER"
When I run the script, it fails with the following output:
Searching for host...
Host "sftp_VENDOR_CUSTOMER" does not exist.
I have verified that the site exists in WinSCP. If I run it manually in a Windows command prompt, it succeeds
I initially thought it was an issue with having the site profile within a folder. I moved the site profile to the root and it still fails while working when run line by line from the command prompt.
I also tried wrapping the site profile name in double-quotes, escaped with a second set and I get the same exact error.
WinSCP /ini=nul /command "open ""sftp_VENDOR_CUSTOMER"""
Is this a bug or is there something incorrect in my script?
Note: I want the commands included within the Windows batch script as I will be replicating this and additional commands for several vendor/customer combinations and it is much easier to make parameters for one batch script file than to modify the batch script and the WinSCP command script.