I have a dos batch file running Sftp. Is it possible to return an errorlevel back to my batch file is sftp doesn't execute successfully.
Terry
Release announcements
- 2024-04-09 Copssh client 7.14.2
- 2024-04-09 Copssh server 8.5.1
- 2024-04-09 Copssh server 7.17.1
- 2024-04-09 OpenSSL tool 1.9.0
- 2024-04-09 cwRsync server 6.8.0
Terry,
You are using sftp in a a script, try sftp -b batchfile host
and put all your sftp commands inside batchfile.
Then $? will return 1 if something failed.