SECURECRT automatically upload file python script

Source: Internet
Author: User
Tags python script

I use securecrt under Ubuntu, upload files used to use the RZ command. Each time you upload the dialog box to select the file is determined before uploading, it feels very laborious. Finally, I'm trying to sort out a script.

By using the "Run ..." button on the "Script" menu, then select the script "Run" to upload it automatically. Very convenient ~

#$language = "Python"#$interface = "1.0"defMain (): CRT. Screen.synchronous=True CRT. Screen.send ("RM-RF demofile\n")#delete old files firstCrt. Screen.waitforstring ("[email protected] xx]$") Crt. Filetransfer.addtozmodemuploadlist ("/your_path/bin/demofile")#Add file to upload listCrt. Filetransfer.zmodemuploadascii = True#Add this implementation RZ will not play the Select File dialog box. CRT. Screen.send ("rz\n") Crt. Screen.waitforstring ("[email protected] xx]$") Crt. Filetransfer.zmodemuploadascii= False#set up recall toMain ()

Technology is still relatively weak slag AH ~ ~ ~ won't use those Tmux

SECURECRT automatically upload file python script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.