通过VBExcel自动化腻子

我想通过Excel VBA自动执行以下过程:1.打开Putty特定path2.使用Credentialslogin3.导航到服务器中的path。 (cd / folder1 / folder2)我可以做1&2.因为我是新来的VBA,我不知道如何实现第三。

 Public Sub Test() Dim PuttyPID as Long, username as String, password as String username= " xxxxxx": Password= "123456" P1 = "C:\Program Files (x86)\PuTTy\putty.exe - ssh" & username & _ "@xx.yyy.zzz.aaa - pw" & Password PuttyPID = Shell(P1, 1) ''''''''''''''''''''''''''''''''''''''''''' Application.Wait Now + TimeSerial(0, 0, 20) ' <-- give it time to get server prompt AppActivate PuttyPID ' <-- activate it again to make sure SendKeys "cd /folder1/folder2" & vbCr ' <-- vbCR to simulate CR key End Sub