WinSCP does exit with code 1 when the connection fails. I'm not sure what you ask for.
- martin
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
See https://winscp.net/eng/docs/scriptcommand_get
When wildcard is used, command succeeds, without doing anything, if the wildcard does not match any file, by default (you can change this usingoption failonnomatch on
command).
(You have to use the latest beta version for this)
Wow! I would never have thought to review the get command for this. I should never overlook the rest of the script. I feel silly it was that easy :) Thank you for the help, I really appreciate it.
See https://winscp.net/eng/docs/scriptcommand_get
When wildcard is used, command succeeds, without doing anything, if the wildcard does not match any file, by default (you can change this usingoption failonnomatch on
command).
(You have to use the latest beta version for this)
When wildcard is used, command succeeds, without doing anything, if the wildcard does not match any file, by default (you can change this usingoption failonnomatch on
command).
START /WAIT WinSCP.com /console /script=WSCP-GetRDC.txt /log=%log% /xmllog=%log2%
option batch on
option confirm off
open sftp://USER/PASS/HOST -hostkey="KEY HERE" -timeout=60 -passive=on
option transfer binary
get -delete *.ext1 "\\MyPath\Folder\"
get -delete *.ext2 "\\MyPath\MyFolder"
exit