Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > File Transfer


Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-08-2017, 02:16 PM
mschaafs mschaafs is offline
Registered User
Join Date: Oct 2017
Posts: 27
Question Javascript SFTP Tab

Good day... I am trying to open a new tab via Javascript for SFTP. I have used the vbscript guide example as a basis, but it is not working. It would be great if there were a version of that guide in JS to use!
In any case, here is what I have, any insights would be greatly appreciated!

// SFTP test
var objTab;
var objSFTPTab;
objTab = crt.Session.ConnectInTab("/S");
//objTab.Caption = "New SFTP Tab";

// Create an SFTP tab associated with the existing tab
objSFTPTab = objTab.ConnectSFTP();

// Wait for the SFTP tab to be ready for input.
objSFTPTab.Screen.Synchronous = true;

// Upload all .txt files in the current local working directory to
// the current remote working directory.
objSFTPTab.Screen.Send("put *.txt" + String.fromCharCode(13) + String.fromCharCode(10));

// Close the SFTP tab
// Close the connection on the originating SSH2 connection's tab
Reply With Quote

file transfer , javascript , scripting , session tabs , sftp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 08:01 PM.