Original Script Example: SFTPTabAutomation.vbs.txt SFTPTabAutomation.py.txt
The scripts above demonstrate opening an SFTP tab and programmatically driving a file download. Prior to running a copy of this script, the currently active tab must already be connected with the SSH2 protocol to a remote server that is capable of providing SFTP functionality; otherwise an error will occur and script execution will be halted.
Open SFTP Tabs for All Connected Sessions: AutomateConnectSFTPForOpenTabs.py.txt
This example script will open SFTP connections for all connected tabs in the same SecureCRT window, by default closing existing shell tabs. No file transfers are automated in this example; its purpose is to show how to open SFTP tabs in place of shell connections (and it also shows how to drive the Command Window in Send to All mode, in order to send initial lpwd and pwd commands to each new SFTP tab).
Logon Script Example: SFTP_Tab_ConnectionLogonScript(close-shell-tab).py.txt
This example script is designed to be used as a logon script for a copy of an existing SSH2 session. Suggested usage is to name the copy with a trailing "-SFTP" tag, and configure this copy with the Logon script in the Session Options / Logon Actions category set to this script file. The script will (a) connect, (b) create an SFTP tab using the established SSH2 connection, and then (c) close the original SSH2 shell tab. If the SSH2 server does not support SFTP connections, this script will fail.
Here you can control cookies using the checkboxes below. Some cookies are essential for the use of our website and cannot be disabled. Others provide a convenience to the user and, if disabled, may reduce the ease of use of our site. Finally, some cookies provide anonymous analytic tracking data that help us provide the user with a richer browsing experience. You can elect to disable these cookies as well.