我有一些使用 Putty 的 pscp.exe 文件登录 Unix 服务器的 VBA 代码。我正在使用 Windows 7。
问题是用户名包含@ 字符。如果我使用以下 VBA 代码,我将无法登录。
那么,我应该如何更换Username = "user@example.xxx"
才能登录?
Dim Host As String
Host = "grid1.example.xxx"
Dim Username As String
Username = "user@example.xxx"
Dim Password As String
Password = "Password2012"
Dim Command As String
Command = "pscp.exe -sftp -l " & Username & " -pw " & Password
Shell Command, vbNormalFocus