<%
Set oShell = server.CreateObject("Shell.Application")
Set objFSO = server.CreateObject("Scripting.FileSystemObject")
'Path to file or folder to upload
path = "**********" 'locale
FTPDir = "/**********/" 'remota
call FTPUpload(path,FTPDir)
Sub FTPUpload(path,FTPDir)
'On Error Resume Next
'Copy Options: 16 = Yes to All
Const copyType = 16
'FTP Wait Time in ms
waitTime = 100
FTPUser = "**********"
FTPPass = "**********"
FTPHost = "**********"
strFTP = "ftp://" & FTPUser & ":" & FTPPass & "@" & FTPHost & FTPDir
Set objFTP = oShell.NameSpace(strFTP)
'Make new folder on FTP site
'Upload single file
If objFSO.FileExists(path) Then
Set objFile = objFSO.getFile(path)
strParent = objFile.ParentFolder
Set objFolder = oShell.NameSpace(strParent)
Set objItem = objFolder.ParseName(objFile.Name)
objFTP.CopyHere objItem, 16
End If
'Upload all files in folder
If objFSO.FolderExists(path) Then
'Code below can be used to upload entire folder
Set objFolder = oShell.NameSpace(path)
objFTP.CopyHere objFolder.Items, cFlags
End If
%>