Errorlevel code for sftp?

2 posts / 0 new
Last post
itefix
Offline
Last seen: 6 days 6 hours ago
Joined: 01.05.2008 - 21:33
Errorlevel code for sftp?

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

itefix
Offline
Last seen: 6 days 6 hours ago
Joined: 01.05.2008 - 21:33
Re: Errorlevel code for sftp?

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.

Topic locked

Release announcements