• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ftp transfer using apple script (using URL Access)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftp transfer using apple script (using URL Access)


  • Subject: Re: ftp transfer using apple script (using URL Access)
  • From: Jolly Roger <email@hidden>
  • Date: Tue, 19 Jun 2001 10:17:04 -0500

On 6/19/2001 9:10 AM, "g_vkatta" <email@hidden> wrote:

> hi!
>
> can any one help me with the script that tells "Fetch"(used for FTP transfer)
> to transfer the files,"Fetch" should by default take the username and password
> and should transfer the files from the path mentioned to the destination path!
>
> if not with fetch ,please provide me with any hint so that my script will be
> usefull in transferring the files.I am planning to save the script as
> "classing applet" with "stay open" option.

I use URL Access Scripting, because it allows you to transfer files
transparently in the background. Here's a sample script:

-- begin script
property FTPfilename : "test.html"
property FTPusername : "username"
property FTPpassword : "password"
property FTPhost : "www.domain.com"
property FTPpath : "pub/incoming/"

set filePath to (path to startup disk as text) & "Desktop Folder:" &
FTPfilename
set myURL to "ftp://"; & FTPusername & ":" & FTPpassword & "@" & FTPhost &
"/" & FTPpath & FTPfilename

log filePath
log myURL

try
-- try connecting for 5 minutes
with timeout of 300 seconds
tell application "URL Access Scripting"
upload filePath to myURL replacing yes without binhexing
quit
end tell
end timeout
on error the errmsg number errnum
tell application "URL Access Scripting" to quit
if the errnum is not -128 then
tell application (path to frontmost application as text)
beep
display dialog "URL Access Scripting error: " & the errmsg
buttons {"OK"} default button 1
end tell
end if
end try
-- end script

HTH

JR


References: 
 >ftp transfer using apple script! (From: g_vkatta <email@hidden>)

  • Prev by Date: script inside application package
  • Next by Date: Re: moving files from one volume to another?
  • Previous by thread: ftp transfer using apple script!
  • Next by thread: Re: ftp transfer using apple script!
  • Index(es):
    • Date
    • Thread