Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ftp and using mget

Status
Not open for further replies.

vgwprja

Programmer
Joined
Mar 27, 2008
Messages
24
Location
US
Is there a way of having a vb script pause after getting each file (using wscript.sleep ?). I need to do some processing on the recipient side before next file can be retrieved?

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 ("lcd " & strLocalFolderName)
objMyFile.WriteLine ("prompt off")
objMyFile.WriteLine ("mget " & strFilePut)
objMyFile.WriteLine ("disconnect")
objMyFile.WriteLine ("bye")
objMyFile.Close
 
Can you process the files after they are retrieved? I don't see how this can be accomplished during the mget.
 
Yes, I think that is what I will have to do. Thank you.
 
Another option might be to use another FTP client that can be "scripted" via Exec() and the stdio streams.

Example: MOVEit Freely
 
Oops, you wanted to use mget though and process in between. Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top