Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Variables _IFTP, _IFTPS: what about sftp connections?

Aug
10
0
I can detect is there is an active ftp connection by inspecting the variable _IFTP
I can detect if there is an active ftp session over ssl by inspecting the variable _IFTPS
But what if I connected with the sftp protocol? Is there any corresponding variable?
iftp sftp://user:mypassword@hostname/directory/subdir/
echo %_IFTP
0
echo %_IFTPS
0

When I work interactively, I can just use the command IFTP to see if there is an active connection. It is enough to look at the output of the command on screen.
But I would like to write a batch file doing different things whether a sftp connection is active or not. I can imagine two other features that could help me handle this:
- Is there any way to capture the standard output of a command and put it into a command line? (something like command substitution in other kinds of shells)
- Or can I retrive the output of the last command and place it into a variable? Do I need to use any temporary file?

Suggestions for alternative approaches are welcome!
 
The issue has been fixed with the last update of take command:
16.02.48 %_ISFTP internal variable (IFTP SSH flag)
:)
 

Similar threads

Back
Top