tengo un script hecho para mandar archivos por ftp y me funciona perfectamente.
Es este:
Código:
Código:
'****************FTP Upload
'Upload a file/folder to an FTP server
Set oShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
MiMes=Month(Now)
strDate2=ucase(MonthName(MiMes))
strDate = Day(Date()) &"_"& ucase(MonthName(MiMes))
'Path to file or folder to upload
path = "C:\archivos\archivoftp_"&strDate&".csv"
FTPUpload1
Sub FTPUpload1
if Time()>TimeValue("04:00:00") and Time()<TimeValue("04:45:00")Then
MiMes=Month(Now)
strDate2=ucase(MonthName(MiMes))
strDate = Day(Date()) &"_"& ucase(MonthName(MiMes))
On Error Resume Next
'Copy Options: 16 = Yes to All
Const copyType = 16
'FTP Wait Time in ms
waitTime = 80000
FTPUser = "user"
FTPPass = "pass"
FTPHost = "ftphost"
FTPDir = "/archivos"
strFTP = "ftp://" & FTPUser & ":" & FTPPass & "@" & FTPHost & FTPDir
Set objFTP = oShell.NameSpace(strFTP)
'Make new folder on FTP site
'objFTP.NewFolder "FTP Backup"
'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)
Wscript.Echo "Uploading file " & objItem.Name & " to " & strFTP
objFTP.CopyHere objItem, copyType
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)
Wscript.Echo "Uploading folder " & path & " to " & strFTP
objFTP.CopyHere objFolder.Items, copyType
End If
If Err.Number <> 0 Then
Wscript.Echo "Error: " & Err.Description
End If
'Wait for upload
WScript.Sleep waitTime
End if
End Sub
Qué tengo que cambiar de este script para poder subir por ftps tcp/990 ?
gracias