Your best friend for file transfer.

Fetch application logoFetch

How to delete every file from server (2 posts)

  • Started 9 months ago by Maurizio
  • Latest reply 9 months ago from Jim Matthews
  • Maurizio Member

    Hi,

    I'm trying to use AppleScript to clean the server. I wish to empty the folder I'm working with.

    If I use this script to download every file it works:

    set thereFolder to alias "MacSSD:Users:user:Desktop:here:"
    tell application "Fetch"
    activate
    set tWindow to make new transfer window at beginning with properties {hostname:"ftp.server.com", username:"user", password:"1234", initial folder:"ftp.server.com/ftp/fetch/"}
    tell tWindow
    download every remote item to thereFolder
    close
    end tell

    end tell

    When I try something like this instead I get errors:

    set thereFolder to alias "MacSSD:Users:user:Desktop:here:"
    tell application "Fetch"
    activate
    set tWindow to make new transfer window at beginning with properties {hostname:"ftp.server.com", username:"user", password:"1234", initial folder:"ftp.server.com/ftp/fetch/"}
    tell tWindow
    remove every remote item of transfer window "tWindow"
    close
    end tell

    end tell

    Error says: Some parameters are missing for Remove, error -1701.

    Thank You for any help

    Posted 9 months ago #

  • Jim Matthews Administrator

    Hi,

    Does it work if you remove "of transfer window "tWindow"" from "remove every remote item of transfer window "tWindow"" ? I don't think you need it, since you are in a tell tWindow block.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 9 months ago #

Reply

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