Your best friend for file transfer.

Fetch application logoFetch

Automator Help (13 posts)

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

    I am trying to build an Automator workflow to rename an existing file on an FTP site (a file which was not sent by Fetch). However, I can't seem to connect the right actions together.

    I have a workflow with two Fetch actions: Get Specified Fetch Items followed by .

    I add this action, hit the "+" to and specify my connection arguments.

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Randy,

    I think part of your message didn't come through - could you please try posting again?

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

  • RandyV Member

    Sorry -- it did get cut off. I also need to say I'm new to using Automator, so bear with me.

    I created a workflow starting with Get Specified Fetch Items followed by a Rename Fetch Items Step.

    When I add the Get Specified Fetch Items, I click "+" and set the connection up (user name, password, initial folder, etc.) but when I run the automator workflow, nothing happens. Fetch doesn't launch and there is no output from the Get Specified Fetch Items action. The Rename action then fails because it has no input from the previous step.

    Here's what I'm trying to accomplish: on an SFTP site I have a folder named /foo with a bunch of files named bar.xml, bar1.xml, bar2.xml, etc. I am trying to create a workflow to have Fetch connect to the FTP server and rename those files, automatically, to bar.xml.foo, bar1.xml.foo, bar2.xml.foo, etc.

    I have successfully created a workflow to upload and rename a file, but I am trying to create a workflow that will connect to a server and rename files that are already on the server. I assume Get Specified Fetch Items gets the list of files from the specified FTP patch, but it's not working that way.

    I'm using Fetch 5.5.3 and Snow Leopard 10.6.2.

    Thanks for the quick reply & sorry my first message got cut off.

    Randy

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Randy,

    First, you'll actually need another couple of Fetch actions in your workflow. Get Specified Fetch Items does not return a list of the files from the specified path; it returns exactly the item at that path. So if you specify a folder name there, what will get passed on to the next action is that folder and that folder alone, not its contents.

    So you'll want a Get Fetch Folder Contents action in between the Get Specified Fetch Items and the Rename Fetch Items actions; that will get the contents of the folder listed in Get Specified Fetch Items.

    However, then what will get passed to the next action is the folder plus all of its contents; since you probably don't want to try to rename the folder, you should put a Filter Fetch Items action after the Get Fetch Folder Contents action, and set it filter items whose "Item Type" is "File".

    So what you want is:

    * Get Specified Fetch Items
    * Get Fetch Folder Contents
    * Filter Fetch Items: Whose "Item Type is File"
    * Rename Fetch Items

    Second, the workflow should launch Fetch even without those additional actions - the Get Specified Fetch Items action alone should open Fetch if it's not running. I'm not sure why it isn't. Do you have more than one copy of Fetch on you Mac (such as an older version)?

    But try setting it up as described above, and running it with Fetch already open to see if works; then we can sort out the "why doesn't it open Fetch problem."

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

  • RandyV Member

    Thanks, Scott. I sincerely appreciate the help.

    I set up the workflow exactly as you described. The first action, Get Specified Fetch Items, is not working. If I step through the workflow, Get Specified Fetch Items does not launch Fetch, but Automator says the action was successful. Obviously, the subsequent steps fail because there is no input from the first step.

    After I set my connection profile in that action, should I see anything in the Name or URL column? After I hit + and set my profile, nothing visibly changes with the action, which seemed strange. I figured it would show me what connection profile would be used when the action runs, but instead is shows nothing.

    Automator shows that step as belonging to Fetch 5.5.3. I am running 5.5.3 and just upgraded from 5.3.1 yesterday. I only have one copy (5.5.3) installed. I did need to use the "hold down Option while launching Automator" trick to get the Fetch actions to show up in Automator if that matters. The other actions DO work. As I said in my last post, I have created workflows that upload and rename files successfully.

    My install of Snow Leopard is completely stock. No funny configuration mods under the hood or anything like that.

    Let me know what I should check or do next. Thank you for your help!

    Randy

    Edited 4 years ago #

  • Scott McGuire Administrator

    Hi Randy,

    Thanks for that additional information. Yes, after entering the connection information and a path, you should see something listed in the name and URL columns of the Get Specified Fetch Items action.

    Could you please do the following?

    * Quit Automator if it's running.
    * Open Fetch.
    * Dismiss any dialog or alerts (such as the New Connection dialog or a trial warning dialog).
    * Open Automator again.
    * Create a new workflow.
    * Add a Get Specified Fetch Items action.
    * Click the plus button in the action, and enter connection information.
    * Click OK to save the connection information.

    Do you see something in the URL column in the Get Specified Fetch Items action?

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

  • RandyV Member

    Nothing appeared in the URL column. I tried adding the connection information in the action by both selecting a favorite (which is what I have been doing in my previous tests) and also by just manually entering the info.

    However -- I figured out what's wrong. The action does not work with SFTP connections.

    I tried your steps used a regular (non-secure) FTP connection and the URL showed up as expected. When I use an SFTP connection, nothing happens.

    Looks like there's an issue with the Get Specified Fetch Items action when using a SFTP connection.

    Randy

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi,

    I've tested both FTP and SFTP connections in Get Specified Fetch Items on 10.6.2 and both work for me (the URLs show up and items are gotten); and I tested again on a second Mac with the same result. So this is not a general problem with the action, it's something specific about your situation. I will consult with my colleagues and someone will get back to you.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Edited 4 years ago #

  • RandyV Member

    Sounds good. Thanks for your continued (and very prompt) help with this!

    I may try to try to remove and re-install Fetch to see what happens. As I said, my install of Snow Leopard is bone stock.

    Randy

    Posted 4 years ago #

  • RandyV Member

    Scott --

    I solved the problem.

    This issue is with the SFTP username I am using. The SFTP server I am connecting to is a Windows box and requires that I include the Windows domain when authenticating. In the Fetch username field, I use the format:

    domain\user

    The Automator action does not like the single backslash (even though this works fine when using Fetch interactively).

    If I use a double-backslash in the Fetch username field for the action (domain\\username), the action works.

    Randy

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Randy,

    Sorry for the delay in getting back to you.

    I'm glad you figured out the problem, and thanks for letting us know what you discovered. We'll take a look and see if we can improve the behavior of the Get Specified Fetch Items action in that situation.

    Now that you've fixed that, is the rest of the workflow working as you wanted it to?

    Thanks,

    Scott McGuire
    Fetch Softworks

    Edited 4 years ago #

  • RandyV Member

    Yes -- everything is working perfectly now. Thank you for your help (especially on a weekend). I appreciate it!

    Randy

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Randy,

    You're welcome, and we're glad to hear it's working now!

    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.