I'm using this code:
strNewRarArchiveFolder = "c:\users"
FTPUpload(strNewRarArchiveFolder)
Sub FTPUpload(path)
FTPUser = "login"
FTPPass = "password"
FTPHost = ftp.myftp.com
FTPDir = "/mydir/mysubdir/"
strFTP = "ftp://" & FTPUser & ":" & FTPPass & "@" & FTPHost & FTPDir
Set objFTP = fso.GetFolder(strFTP)
If objFSO.FolderExists(path) Then
Set objFolder = oShell.NameSpace(path)
Wscript.Echo "Uploading folder " & path & " to " & strFTP
Set CopiedObj = objFTP.CopyHere(path)
End If
End Sub
Grendi, to the best of my knowledge, the answer is _NO_.
The "CopyHere" method belongs to Shell.Application. In
other words it is part of the "shell" (desktop et al),
and implemented in shell32.dll.
There are other dll's which enable you to talk to an
FTP site, for example: wininet.dll and winsock.dll.
If you are one of those odd-balls who think it is o.k.
to call api's from script, then you could translate
microsoft's sample ftp application from vb to vbs.
Here is ms's vb code "Implementing FTP Using WinInet
API from VB", found here:
http://support.microsoft.com/kb/175179
What you get is the (vb) source code, and the compiled
"vbftpjr.exe" ftp utility, which you could use from
script, by calling it as a command line utility.
But then, vbftpjr is relatively primitive, and if you
are going to use a command line utility anyway, there
are numerous others of a more modern vintage and with
more enhanced capabilities. Filezilla is mentioned
frequently by pcMag, but there are a number of others:
http://www.thefreecountry.com/webmaster/freeftpclients.shtml
There is another approach if you are amenable to using
3re-party controls, and have a modest software budget
available. There are a number of actX controls which
will do ftp, which you can find via google. And, since
vbs has an ole interface, you can use them from script.
http://www.dart.com/ctl_ftp.aspx
cheers, jw
____________________________________________________________
You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)