I need a script that retrieves a file from a remote server. Either Perl or shell script is fine, as long as it can run under OS X (Both Perl and shell should work and I will test). Here's what it needs to do:
1) Connect to a remote computer using FTP/TLS. Domain/IP address, port, user/pwd are hard-coded in the script.
2) Go to a directory on the remote computer (remote directory A). Path is hard-coded in the script.
3) Get the file in that remote directory that has the most recent creation date.
4) Copy the file to a directory on the local computer. Path is hard-coded in the script.
5) If copy was successful, move the file on the remote computer from its original location (remote directory A) to another directory on the remote computer (remote directory B). Path is hard-coded in the script.
6) Send an email (address hard-coded) with the success/failure for each step:
- connected to remote computer
- found remote directory A to copy from
- found a file in the remote directory
- read file from remote directory
- found local directory to copy to
- wrote file to local directory
- found remote directory B to move file to
- moved file from remote directory A to remote directory B
Needs to be well commented, and I'd appreciated up-front variables.
10 pekerja bebas membida secara purata $68 untuk pekerjaan ini
Thanks for the invite. I can write this script for you. Will I have access to the OS X machine for testing? I can test on my end and it should work fine on your machine as long as all the perl modules are installed.