Your best friend for file transfer.

Fetch application logoFetch

passive mode from Applescript (3 posts)

  • Started 6 years ago by JImBrandt
  • Latest reply 6 years ago from JImBrandt
  • JImBrandt Member

    Jim,

    Is there a way to toggle passive mode using Applescript before transferring a file?

    I have a script that is attached to a watch folder and an FTP site that requires passive mode. I need to be able to toggle passive mode on before sending to this FTP site, and then toggle it back off before sending to other sites. If there are multiple transfers going, does passive mode affect all of them, or can it be "Transfer Window" specific?

    JIm Brandt

    Posted 6 years ago #

  • Jim Matthews Administrator

    Hi,

    Yes, you can toggle passive mode using AppleScript. For example:

    tell application "Fetch"
    set use passive mode to false
    end tell

    The setting is global, but does not change the behavior of transfer windows that have already been opened. Fetch should also automatically switch a window from using passive mode to not using it, and vice-versa, if whatever it tries first does not work.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 6 years ago #

  • JImBrandt Member

    Ah, but it doesn't always work automatically for me. I send commercials to TV stations and I have a station whose FTP site requires passive mode (stated in their documentation). I normally run in active mode (preference box for passive mode is not checked) because our own cloud-based FTP site doesn't like passive mode.

    This stations's site will not respond to a list files command and thus it hangs trying to get the list of files during the initial login. If I switch manually to passive mode, it logs in immediately.

    Since I'm contacting the station using an AppleScript, I wanted to try switching to passive mode with the script before logging in to see if it makes a difference.

    I'll throw a "set use passive mode to true" statement in to see if that fixes my issue. Thanks.

    Jim Brandt

    Posted 6 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.