Your best friend for file transfer.

Fetch application logoFetch

Mirror command and applescript (4 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 22 years ago by mstoolmi
  • Latest reply 22 years ago from mstoolmi
  • mstoolmi Member

    I can not seem to get the mirror command to work with the following applescript:

    set DestURL1 to "ftp://name:password@www.x.y.z/testftp"
    set DestURL2 to "ftp://name:password@www.x.y.z/testftp/"
    set src to "localdrive:folder:"

    --try
    startMirror(src, DestURL1)
    startMirror(src, DestURL2)
    --on error
    -- display dialog "There was a problem." & src & DestURL1 & DestURL2 buttons "Rats!" default button 1
    --end try

    on startMirror(src, destURL)
    if destURL * "" then
    with timeout of 60000 seconds
    tell application "Fetch 4.0"
    -- send files to LRCWebstar
    --try
    mirror src to destURL
    --on error
    -- display dialog "There was an error mirroring to " & destURL & "." buttons "Rats!" default button 1
    --end try

    -- quit
    end tell
    end timeout
    end if
    end startMirror

    I keep getting the error "Fetch 4.0 got an error. Expected a reference"

    Any ideas?

    Posted 22 years ago #

  • Jim Matthews Administrator

    I would try changing this line:

    set src to "localdrive:folder:"

    to this:

    set src to alias "localdrive:folder:"

    Does that help?

    Jim Matthews
    Fetch Softworks

    Posted 22 years ago #

  • Jim Matthews Administrator

    Actually you also want to change:

    mirror src to destURL

    to:

    mirror src to url destURL

    Jim Matthews
    Fetch Softworks

    Posted 22 years ago #

  • mstoolmi Member

    Thanks.

    Worked like a champ.

    Believe it or not, I had tried both of those options, but I guess not at the same time.

    Posted 22 years ago #

Topic closed

This topic has been closed.