Your best friend for file transfer.

Fetch application logoFetch

Simple Apple Script Question (9 posts)

  • Started 5 years ago by tinmanfoto
  • Latest reply 4 years ago from Scott McGuire
  • tinmanfoto Member

    what's wrong with my script:?

    set theFile to "Macintosh HD:Folder:myfile.pdf"
    set destinationURL to "ftp://username:@server_url/folder/"
    tell application "Fetch"
    put into url destinationURL item theFile
    end tell

    it works if I use:
    set theFile to (choose file with prompt "Choose file to upload files from:" as string)
    instead of:
    set theFile to "Macintosh HD:Folder:myfile.pdf"

    any help is much appreciated!

    Posted 5 years ago #

  • Jim Matthews Administrator

    Hi,

    Try changing

    set theFile to "Macintosh HD:Folder:myfile.pdf"

    to

    set theFile to file "Macintosh HD:Folder:myfile.pdf"

    Does that work?

    Jim Matthews
    Fetch Softworks

    Posted 5 years ago #

  • tinmanfoto Member

    yes I did, I get a different error: can't get file "Macintosh HD:Folder:myfile.pdf"

    Posted 5 years ago #

  • Jim Matthews Administrator

    Hi,

    Hmm. Another thing to try is

    set theFile to alias "Macintosh HD:Folder:myfile.pdf"

    Does that work?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 5 years ago #

  • tinmanfoto Member

    Very cool. That works! Thank you so much for your help.

    Posted 5 years ago #

  • Addington Member

    I used fetch to move a webpage I designed in iweb on my mac to another server.
    I have to go in and edit it. I went back to iweb and made those edits. Now
    do I just get fetch to move only the page with corrections or the entire file? Does fetch replace the old
    files with the new? Addington

    Posted 5 years ago #

  • Scott McGuire Administrator

    Hi Addington,

    Due to the way iWeb works, it is usually best to upload your entire website again after making changes (because even if you think you're making changes to just one page, sometimes other iWeb pages will be changed as well and it may not be obvious which ones).

    You should do exactly what you did the first time to upload your website (including to Publish to Folder with iWeb), and when you upload, Fetch will replace the old webpages with the new ones.

    We have step by step instructions on using Fetch to upload websites created with iWeb - it may be helpful to read it over if you haven't already; it also links to a help topic that suggests solutions to common problems.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Edited 5 years ago #

  • Addington Member

    Wow - it worked just as you suggested. I thought all my hard work creating a website would be for nothing.
    Thank you Fetch for making it so easy and for making me look like a pro.

    Thanks again!

    Addington

    Posted 5 years ago #

  • Scott McGuire Administrator

    Hi Addington,

    You're welcome, we're glad to hear you're all set!

    Best,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.