an0nyM0use
IS-IT--Management
I am having difficulties getting my script to retrieve this file. It needs to change directories once it connects to the FTP Server in order to retrieve the file. This is th script I am trying to use. Any suggestions would be very welcome.
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim remoteURL, username, password, transferMode, localDir, remoteDir, remoteFile
Dim fso, ftpscrfileName, ftpscrfileDir, scriptscr, ftpscrfile
Dim ReturnCode, Ouput
Set fso = CreateObject("Scripting.FileSystemObject")
ftpscrfileDir = cd "C:../docent/"
ftpscrfileName = ftpscrfileDir & "My_Prod_LMS.zip"
Set ftpscrfile = fspenTextFile(ftpscrfileName, 2, True)
remoteURL = "my ip address here"
username = "MyUID"
password = "MyPass"
transferMode = "bin" '-------asc (ascii) /bin (binary)
localDir = "D:InetpubFTP_Root\Docent_DB_Backup"
remoteDir = cd "../docent/"
remoteFile = "My_Prod_LMS.zip"
scriptscr = "open "& remoteURL & vbcrlf &_
username & vbcrlf &_
password & vbcrlf &_
transferMode &vbcrlf &_
"lcd "& localDir & vbcrlf &_
"GET "& remoteDir &""& remoteFile & vbcrlf &_
"bye"
End Function
*******************************************************
Thanks,
Kevin
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim remoteURL, username, password, transferMode, localDir, remoteDir, remoteFile
Dim fso, ftpscrfileName, ftpscrfileDir, scriptscr, ftpscrfile
Dim ReturnCode, Ouput
Set fso = CreateObject("Scripting.FileSystemObject")
ftpscrfileDir = cd "C:../docent/"
ftpscrfileName = ftpscrfileDir & "My_Prod_LMS.zip"
Set ftpscrfile = fspenTextFile(ftpscrfileName, 2, True)
remoteURL = "my ip address here"
username = "MyUID"
password = "MyPass"
transferMode = "bin" '-------asc (ascii) /bin (binary)
localDir = "D:InetpubFTP_Root\Docent_DB_Backup"
remoteDir = cd "../docent/"
remoteFile = "My_Prod_LMS.zip"
scriptscr = "open "& remoteURL & vbcrlf &_
username & vbcrlf &_
password & vbcrlf &_
transferMode &vbcrlf &_
"lcd "& localDir & vbcrlf &_
"GET "& remoteDir &""& remoteFile & vbcrlf &_
"bye"
End Function
*******************************************************
Thanks,
Kevin