A convenient way for Windows systems to access Linux systems directly

Source: Internet
Author: User

There are a lot of blog introduction: The following

Http://www.cnblogs.com/echo-something/archive/2012/09/20/pscp.html

http://blog.csdn.net/zyz511919766/article/details/27546515

1. Use a Public toolkit putty

2. Can write a bat program to do some batch operation and automated operation

Examples of use are as follows

CD D:\tools\888888 [email protected]:/root/script/time_solidify.sh./updatedate.  888888./time_solidify.sh 192.1.51.195:/root/script/time_solidify.sh
' Read the specified file Dim pathway Dim fso, Myfile,newfile,i,flag,currentdate pathway= "D:\tools\putty\time_solidify.sh"New_pathway= "D:\tools\putty\new_time_solidify.sh"Flag= 1SetFSO = CreateObject ("Scripting.FileSystemObject")IfFso. FileExists (pathway) Then            SetMyFile = fso. OpenTextFile (Pathway,1,false)IfFso. FileExists (New_pathway) Then' Empty FSO. DeleteFile (New_pathway)End if            SetNewFile = fso. CreateTextFile (New_pathway,false)ElseFlag= 0End If         SetRegEx =New RegExp regEx. Pattern = ". *\d{4}-\d{2}-\d{2}.*"IfFlag=1 Then                    Dotxt= MyFile. ReadLine ()IfRegex.test (TXT) Then' acquisition date Vartxt=txt currentdate= Mid (Txt,instr (TXT,CHR (34)) +1,10)currentdate= DateAdd ("D", 1,currentdate)currentdate= Format_time (currentdate,2)Temptxt= "Date-s" &chr &currentdate& "&CHR" & "${now_time}"' Modified date to add a new file among the NewFile. WriteLine (Temptxt)Else' Add content newfile. WriteLine (TXT)End IfLoop while( notMyFile. AtEndOfStream)End If' old file Erase ' FSO. DeleteFile (pathway)' new file renaming FSO. CopyFile New_pathway,pathway ' FSO. DeleteFile (New_pathway)SetMyFile = NothingSetNewFile = NothingSetFSO = NothingSetRegEx =Nothing ' currentdate= DateAdd ("D", 1, "2014-10-31")' MsgBox currentdatefunction format_time(S_time, N_flag)Dim y, M, D, H, MI,s Format_time= ""IfIsDate (s_time) = False Then ExitFunction y= CStr (year (s_time))m= CStr (Month (s_time))IfLen (m) = 1 Thenm = "0"& M D= CStr (Day (s_time))IfLen (d) = 1 ThenD = "0"& D H= CStr (Hour (s_time))IfLen (h) = 1 ThenH = "0"& H mi= CStr (Minute (s_time))IfLen (mi) = 1 ThenMi = "0"& mi s= CStr (second (s_time))IfLen (s) = 1 Thens = "0"& SSelectCase N_flag case1' Yyyy-mm-dd hh: Mm:ssFormat_time=Y & M & D case2' Yyyy-mm-dd format_time= y & "-" & M & "-"& D case3' hh: Mm:ssFormat_time= h & ":" & Mi & ":"& S case4' yyyy mm month DD Day Format_time= Y & "Year" & M & "Month" & D & "Day" Case5' YYYYMMDD format_time=Y & M & DEnd SelectEndFunction

A convenient way for Windows systems to access Linux systems directly

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.