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 news
- 2023-09-21 Copssh client 7.11.1
- 2023-09-17 Wrbldnsd 5.0.0
- 2023-09-17 OpenSSL tool 1.7.1
- 2023-09-17 Logwot8 3.1.1
- 2023-09-17 CowAxess 2.0.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.