Hi everyone
I have a Fedora FTP server (lets call it FTP-SERVER1) and files are constantly being uploaded to it from a 3rd party.
Once every 15 minutes I need to "move" the files from the FTP
server to another server (lets call it SVR-WINDOWS) where it will be processed and then deleted.
I'm thinking the process should be something like this:
- From SVR-WINDOWS, open ftp connection to FTP-SERVER1
- list the contents of the "ftp home" directory (e.g. dir = file1, file2, file3)
- get each file listed (get file1, get file2, get file3)
- delete each file that was copied (delete file1, delete file2, delete file3) to SVR-WINDOWS
- close ftp connection
While the above takes place more files are uploaded to the FTP server. So next time I execute my script, it will move the newly uploaded files.
Does anyone know if it's possible to do the above?
If yes, then how do I go about to "list files" and only get and delete the files "listed".
Many thanks