Yummy Software
Welcome, Guest. Please login or register.
December 05, 2008, 10:43:52 PM
3130 Posts in 601 Topics by 672 Members
Latest Member: matt.stuart
Home Help Search Login Register
Yummy Software  |  Yummy FTP  |  Yummy FTP Talk  |  Applescript and Yummy question « previous next »
Pages: [1] Print
Author Topic: Applescript and Yummy question  (Read 1094 times)
shafiq
Newbie
*
Posts: 1


View Profile
Applescript and Yummy question
« 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
Logged
JD
Administrator
FTP Guru
*****
Posts: 1380


View Profile Email
Re: Applescript and Yummy question
« Reply #1 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

Logged
spacific
Full Member
***
Posts: 185


View Profile
Re: Applescript and Yummy question
« Reply #2 on: January 25, 2008, 12:48:03 AM »

... and of course "wwww." should be "www."

Logged
Pages: [1] Print 
« previous next »
Jump to: