Yummy Software

Yummy FTP => Yummy FTP Talk => Topic started by: shafiq on January 23, 2008, 09:01:31 PM



Title: Applescript and Yummy question
Post by: shafiq on January 23, 2008, 09:01:31 PM
Hi

I am trying to write an applescript that will allow me to download a file into a specified folder and if a file by the same name already exists, then to delete and or overwrite the file.

I need some help with the code I should write. The following snippet was kinda hacked together as I am new to scripting :-(

So far I have the following code but the first part is not working. Any help is appreciated. I get the message "Can't get folder"

--Start
tell application "Finder"
   try
      delete files in folder "/Users/James/Documents/Folder"
   end try
end tell

tell application "Yummy FTP"
   activate
   connect "www.somewebsite.com"
   using connection "wwww.somewebsite.com" list local folder "Users/James/Documents/Folder/"
   using connection "www.somewebsite.com" list remote folder "/httpdocs/"
   using connection "www.somewebsite.com" download "testfile.txt"
   disconnect "www.somewebsite.com"
end tell
--End

Thanks


Title: Re: Applescript and Yummy question
Post by: JD on January 24, 2008, 03:02:41 PM
Sorry for such a delayed reply.

I tested your script. The only thing I can see wrong is that the list local folder line needs a forward slash before Users so, it should be /Users/James/Documents/Folder



Title: Re: Applescript and Yummy question
Post by: spacific on January 25, 2008, 12:48:03 AM
... and of course "wwww." should be "www."