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

FTP remote side

Status
Not open for further replies.

Matta25

Technical User
Jan 6, 2004
82
US
I need to ftp file from the remote site down to my pc. I need to only download the files that have .PGP on them and then rename these files on the remotes file to .old.
Any Ideas.
Thanks
 
I have a couple FTP samples on my site that you might find useful. I would recommend starting with the second one (ftp2.was), which shows how to download all files in the directory from an FTP site. To make sure that only .PGP files show up, you can set the remote filter to *.PGP using set ftp filter remote "*.PGP". You will want to test this manually to make sure the site displays the correct files with that filter (you can do this manually by selecting the Options | Filters menu item).

To rename the file on the FTP server, the command is:

ftp remote rename file1 file2

where file1 is the current name of the file and file2 is the name you want it to be renamed to.


aspect@aspectscripting.com
 
Thank you knob. I modified the FTP2.was file, when it opens the listfile file I tell it to strfind .pgp and it only downloads those files. When it is done downloading the file i then do a strreplace and replace the .pgp with .old so tomorrow it will not download the same files.
Thanks you very much again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top