How to use to sync folder via ftp ? Using curl or ftp shell ?

Hi,

I'm making a script which prepare pictures (files), and then sync these files with a remote ftp folder.

All is good but not the ftp sync.

The idea is simple :
1 - Test if the destination folder on the serveur exist : if not, create it.
2 - If the file already exist on the serveur : do not upload to the serveur (even if the file date is different)
3 - If a file is on the server but not in the source local folder : delete it !

It's a simple sync function. I know how to do that with rsync, but it's only local :
rsync -a --ignore-existing --delete ~/pictures/temp/ ~/pictures/vers-site-valdoule/

So do you have any idea how to do that with already installed shell fonction like curl or ftp ?

Thanks a lot !!! 🙂

Message was edited by: Vinc26

Message was edited by: Vinc26

MacBookPro 17" 2.33GHz with 3GB of RAM, Mac OS X (10.5.2)

Posted on May 14, 2008 8:26 AM

Reply
5 replies

May 15, 2008 11:48 PM in response to Budgie

Yes, it's a good idea but Cyberduck sync function is not perfect at all : I have to confirm. And with some host, because of timezone shift, it's not workin well.

Cyberduck is my favorite ftp client on desktop. But not for scripting. Sorry 😟

For now, I'm using Yummy FTP in my script. It's working well, but I would prefer to use shell function to not have to depend of an external software...

If someone could help about curl or ftp shell.

Many thanks ! 🙂

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to use to sync folder via ftp ? Using curl or ftp shell ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.