迭戈,我多年来成功地使用了下面的代码。该代码从主机获取文件,但我确信可以修改它以将文件放在那里。
'Start Code
Set FSO = CreateObject("scripting.filesystemobject")
'************************************************************************************** '*** Create FTP Action File & Initiate FTP File Transfer
'************************************************************************************** VREDET = filename1 'Variable holding name of file to get
F = "C:\Volume\Temp\FTPScript.txt" 'creates the file that holds the FTP commands
Open F For Output As #1
Print #1, "open ftp.server" 'replace ftp.server with the server address
Print #1, ID 'login id here
Print #1, PW 'login password here
Print #1, "cd " & " Folder1" 'Directory of file location
Print #1, "cd " & " Folder2"