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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP: rename files after mget

Status
Not open for further replies.

mydisney

Programmer
May 7, 2007
55
US
I'm doing an ftp and need to rename files that I have selected in my ftp. I am using rename and selecting all files with a specific extension. This does not work. If I specify the exact file name and extension it works. Since I may select multiple file to be ftp'ed I need to do a mass rename for all files.

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")
objMyFile.WriteLine ("mget " & strFilePut)
objMyFile.Writeline ("rename " & ".bak" & " " & ".sav")
objMyFile.WriteLine ("disconnect")
objMyFile.WriteLine ("bye")
objMyFile.Close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top