I need a way of transferring the latest in a list of files from one server to another, and (if possible) replacing the file from the previous days transfer.
I.e. I have this image file o开发者_开发技巧n a secured server "http://username:password@mysite.com/image-22-2.png" (where 22-2 represents day-month) which is automattically transfered to a non-secure server.
The next day this file is uploaded onto the secure server "http://username:password@mysite.com/image-23-2.png" and I need "image-22-2.png" to be deleted and "image-23-2.png" to replace it.
consider using rsync
if your host permits it
If your host doesn't permit using rsync
, you could set up a cron
job with a scripted ftp
transfer.
精彩评论