ftp1.Connect
ftp1.RemoteDirectory = "/WEB/myl"
ftp1.LocalFile = App.Path + "\temp\rjbj.gif"
ftp1.RemoteFile = "AutoBJ" + Format(Now, "mmdd") + "24.GIF"
ftp1.PutFile
ftp1.Disconnect此代码为:
把本地\temp\rjbj.gif文件上传到ftp1 的/WEB/myl 目录下并重命名!
我现在想把此一个文件不只上传到/WEB/myl 目录下,并且还要上传到/GOV/myl 目录下!
那怎么样实现??
ftp1.RemoteDirectory = "/WEB/myl"
ftp1.LocalFile = App.Path + "\temp\rjbj.gif"
ftp1.RemoteFile = "AutoBJ" + Format(Now, "mmdd") + "24.GIF"
ftp1.PutFile
ftp1.Disconnect此代码为:
把本地\temp\rjbj.gif文件上传到ftp1 的/WEB/myl 目录下并重命名!
我现在想把此一个文件不只上传到/WEB/myl 目录下,并且还要上传到/GOV/myl 目录下!
那怎么样实现??
FTP < test.txt
再使用
Shell yourftp.bat
调用命令上传文件。这个方法的另一个缺点是不知道上传的结果如何。
你最好使用VB6的Microsoft Internet Transfer 控件,使用下面的语句就可以了:
Inet1.URL = "FTP://ftp.myCompany.com"
Inet1.Password = "I(3Lei#4"
Inet1.UserName = "Jonne Smythe"
Inet1.OpenURL
Inet1.Execute , "SEND C:\MyDocuments\Send.txt SentDocs\Sent.txt"
Inet1.Execute , "QUIT"