Your best friend for file transfer.

Fetch application logoFetch

AppleScript: Expected Reference (3 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 19 years ago by haecceity
  • Latest reply 19 years ago from haecceity
  • haecceity Member

    Hello,
    I'm getting the following error message when I run this script "Fetch 4.0.3 got an error: Expected a reference". the error occurs inside the 'else' statement. i can't understand why... i've used a similar 'put into' command in other scripts with no problem. Any suggestions? Thanks,
    ian

    tell application "Finder"
    if folder "Macintosh HD:Users:User:Desktop:Backups" exists then
    else
    make new folder with properties {name:"Backups", desktop:true}
    end if

    set dialogVar to display dialog "Where would you like to backup to?" default answer ""
    set BackupLocation to text returned of dialogVar
    set dialogVar to display dialog "What is your user name" default answer ""
    set UserName to text returned of dialogVar
    set dialogVar to display dialog "What is your password" default answer ""
    set UserPass to text returned of dialogVar

    end tell

    tell application "Fetch 4.0.3"

    set remotedir to "ftp://" & UserName & ":" & UserPass & "@" & BackupLocation & "/Uploads" as string
    open remote directory remotedir

    if remote directory "Backups" exists then
    delete remote directory "Backups"
    put into remotedir item alias "Macintosh HD:Users:user:Desktop:Backups:"
    else
    put into remotedir item alias "Macintosh HD:Users:user:Desktop:Backups:"
    end if
    quit

    end tell

    Posted 19 years ago #

  • Jim Matthews Administrator

    I think that you want "put into remote directory remotedir" rather than "put into remotedir".

    Please let me know if that isn't it,

    Jim Matthews
    Fetch Softworks

    Posted 19 years ago #

  • haecceity Member

    That was it... sorry I didn't notice that.

    Thanks for your quick response. You're the hardest working tech support guy I've ever come across.

    ian

    Posted 19 years ago #

Topic closed

This topic has been closed.