SCP - Please Help

Hi All,

I have written a script that logs onto 1 server and i am trying to copy files from this server to the other.

I have the following string but it doesn’t seem to work. Any help is really appreciated:


do script "scp root@192.168.0.3:/Server1/Documents/* root@192.168.0.4/$Home/Downloads" in window 1

or


do script "scp /var/mobile/Applications/Test/Documents/*:/home/MyUser/Downloads" in window 1

When i run it just copies the files from server 1 onto server 1 again…

Ok, so after a lot of reading and a finding the answer locked away here it is:

(1) Make sure that Remote Login is turned on Under System Prefs

(2) Make sure that the username is stated in the code:


do script "scp /var/mobile/Applications/Test/Documents/ USER@192.168.80.99:/Users/NAME/FOLDER" in window 1

  • Name is your user name in mac
  • Folder is Desktop etc
  • USER is the name of the user on your mac