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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.