在更改凭据后,使用vbscript中使用Shell类的FTP登录停止工作



我有一个Windows Server使用VBScript上传到Web服务器几年,没有任何问题。现在,我将网站移至新服务器,出于某种原因,脚本停止工作...以下摘录引发了错误'object oboce&quot obere&quot&quot&quot&quot&quot&quort&quot&quot&quot&quot&quot&quort&quot&quot&quot"

strFTP = "ftp://" & strFTPUser & ":" & strFTPPass & "@" & strFTPHost & strFTPDir
Set objFTP = oShell.NameSpace(strFTP)
'Make new folder on FTP site
objFTP.NewFolder "FTP Backup"
If Err.Number <> 0 Then
    Wscript.Echo "Error after FTP create: " & Err.Description
End If

我只更改了登录变量,因此我猜想某些东西在新服务器上的配置不同。有人可以建议该怎么办吗?许多CRON类型服务取决于这一点。谢谢

当您在用户名中具有@时,在URL(凭证和主机名的分隔符)中具有特殊含义,您需要将其注册为%40

strFTPUser = "user%40domain"

最新更新