我有一些使用Putty的pscp.exe文件登录Unix服务器的VBA代码。我正在使用Windows 7.当用户名包含@字符时,VBA和Putty的pscp.exe
问题是用户名包含@字符。如果我使用以下VBA代码,我无法登录。
那么,我该如何替换Username = "[email protected]"
才能登录?
Dim Host As String
Host = "grid1.example.xxx"
Dim Username As String
Username = "[email protected]"
Dim Password As String
Password = "Password2012"
Dim Command As String
Command = "pscp.exe -sftp -l " & Username & " -pw " & Password
Shell Command, vbNormalFocus
'命令= “pscp.exe -sftp -l -o用户=” &用户名和 “-pw” &Password' http://www.computerhope.com/unix/sftp.htm – cyboashu
@cyboashu如果我使用该代码,我将被要求输入'[email protected]的密码:' – xms