i found this script a while back, it may be useful. i think i found it here
in the newsgroup or from a "Scripting Guy" post.
strLocalFolderName = "C:\Logs"
strFTPServerName = "ftp.somdomain.com"
strLoginID = "johndoe"
strPassword = "password"
strFTPServerFolder = "upload/somdirectory"
strFile2Put = "some.file"
'The follow lines of code generate the FTP script file on the fly.
strFTPScriptFileName = strLocalFolderName & "\FTPScript.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If (objFSO.FileExists(strFTPScriptFileName)) Then
objFSO.DeleteFile (strFTPScriptFileName)
End If
Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True)
objMyFile.WriteLine ("open " & strFTPServerName)
objMyFile.WriteLine (strLoginID)
objMyFile.WriteLine (strPassword)
objMyFile.WriteLine ("cd " & strFTPServerFolder)
objMyFile.WriteLine ("bin")
objMyFile.WriteLine ("prompt")
objMyFile.WriteLine ("lcd " & strLocalFolderName)
objMyFile.WriteLine ("mput " & strFile2Put)
objMyFile.WriteLine ("bye")
objMyFile.Close
Set objFSO = Nothing
Set objMyFile = Nothing
'The following code executes the FTP script. It creates a Shell
'object and run FTP program on top of it.
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run ("ftp -a -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing
Post by ***@KDHi all... !! .. i have a lil problem..
i have a FTP server , and i need to upload some files on that server with an
..vbs , how can i connect to the ftp server, check if a folder exists and
then upload the file ?? is there any activex or pure vbs code ??
tnx !