folder upload/download between remote and local

Hello all,
Fist of all I am really glad to be here and diving into the world of applescript. So my question is, I do have a folder which I want to download/upload automatically from/to a remote server. Basically I want to have a mechanism where I can easily do some updates to it locally, and then(1)be able to copy it to my remote server automatically and then be able to be able to download it automatically as well with a click of a mouse.

I was able to achieve to accomplish the first part with some tutorials: Here’s it’s.
property scp_target : “myuser@klaweht.com://home/myuser/wiki.klaweht.com/”
on open fileList
repeat with thisFile in fileList
set the item_path to the quoted form of the POSIX path of thisFile
do shell script ("scp -r " & item_path & " " & scp_target)
end repeat
end open

I save this as an app, and when drag the folder I want to copy on this and it works like a charm. Now I want to have the other way around. It doesn’t have to be draggable or something. I am looking for the most basic solution here. I want to copy a folder name data which resides in /home/myuser/wiki.klaweht.com/ and I want to copy this to my desktop. I also want this to be an app so that I can use this in my other computers too. How should I go with this one?

I would appreciate any ideas/recommendations and answers of course.
best,
ilteris

Model: mac book pro
AppleScript: 2.2
Browser: Safari 525.13
Operating System: Mac OS X (10.5)

How are you connecting to the remote server?

If via ftp, there is good applescript support in Transmit and Cyberduck ftp clients.

hey misterfriendly, thanks for the reply. I am connecting through ssh and I have already set up my ssh fingers. So it’s an automatic connection. I tried to look for cyberduck’s ssample scripts but couldn’t locate them.

I know that it’s easy to make Transmit only transfer files that don’t already exist at the destination. Haven’t tried to script Cyberduck so I don’t know if it has the same capability.

If you’re looking for a way to do this via a shell script, I can’t help you but maybe somebody else knows how.