Automator workflow help: Moving files

I am have trouble with an automator workflow. My ultimate goal is to create a image capture plugin that will create a dated folder with two subfolders for 'PNG' and 'JPG' files. Thus far I've been able to get the creation of the folder hierarchy I'm trying to create but when once action to import files from my device pulls the files I want I'm having trouble sperating the two file types into there subfolders.
As it stands my work flow consist of the following actions and variables:
*Image Capture plugin work flow*
1. New Dated Folder (Action)
2. Set Value of Variable (Variable)
[Variable: 'Folder' So that I can ref back to this variable]
3. New Folder (Action)
[Folder name: 'PNG' using the 'Folder' variable to store this new folder]
4.Set Value of Variable (Variable)
[Variable: 'PNG']
5. New Folder (Action)
[Folder name: 'JPG' using the 'Folder' variable to store this new folder]
6. Download Pictures (Action)
This is the point in wich I get stuck.
I've tried a few Files & Folders actions but I'm unable to parse by file extension.
(I've tried both Filer Finder Items and Find Finder Items actions set to the file extension but keep pullling all my files to one sub folder or the other.)
Any advice would be much

The Filter Finder Items action should do it - for example, get the original items (and save for later), filter/move one set of items, get the original items back and filter/move another set of items, etc.  Be aware that the period is not a part of the extension, and watch out about mixing previous results into the current set if input items.  Each action has an Ignore Input option (where appropriate) - for example, when getting the original items from a variable, ignore the input so that the previous results (e.g. the path of moved items) don't get mixed in.

Similar Messages

  • How to apply multiple automator workflows to one file

    Hi everyone,
    I've set up a few workflow applications to automate the process of making packshots from PDF files. The way those roughly work is they create a temporary copy in a folder, open a Photoshop droplet that executes all the actions on the file, and then save the finished product in a "finished" folder.
    However, we frequently need to deliver multiple packshots made from the same file. I was asked to make one automator app that allowed us to drop the PDF version on it, resulting in the multiple types of packshots in the "finished" folder, together with the original PDF.
    The way I have this set up right now is as follows:
    1) Copy the original PDF file to the "finished" folder
    2) Execute the first automator app
    3) Execute the second automator app
    This seems simple enough, and does work in 10.6.8. When I try it on a different computer in our studio though, with 10.7 installed, I get various errors:
    - Sometimes it says an error occured within one of the automator apps, while the app works fine when running it seperately (on all computers).
    - Sometimes it says something like "An error occurred while converting the data" when moving on from the first application to the second application
    - Sometimes I'll get an error message in the log, saying:
    *** -[_NSArrayl objectAtIndex:]: index 0 beyond bounds for empty array
    What I got from this is that it's actually not getting the right input it requires (or not getting any input, since it's an empty array). However, the previous task is set to "return the task input" (our systems are Dutch so excuse me for any discrepancies in translations please), and the resulting output that I get seems to be what I want the next automator application to use. Below is a screenshot of the error message:
    What I've tried:
    - I read somewhere that the newer versions of Automator require the action "Retrieve selected finder items" between them. I've tried using this in various ways (between all other actions/tasks, only before the second application to be run and before both applications to be run), but with no success. The problem I have with these is that, during the applications, it moves the files around, thus apparently selecting those folders as well.
    - Building an entirely new workflow on the newer system
    - Using "Start application" instead of "Execute Automator workflow". This results in Automator saying that it did execute the workflow while nothing happened.
    - Using "Ignore input" for the second application. This also results in Automator saying that it executed the workflow while nothing happened.
    So right now, I'm pretty stumped as to how to get this combination of apps to work in 10.7. Any solutions or workarounds are most welcome.
    Thanks in advance!

    Yes, angelanna. You can merge or split your video file via FCP sequence.
    ahaah, maybe I think angelanna would like to get the resulting file with MTS format because he mentioned “No need to be compressed”. Are you asking for this, angelanna?
    If so, a simple MTS files managing and editing tool  is needed. Maybe you can have a try the Mac version of Aunsoft Final Mate for managing HD camcorder footages. I just downloaded its free trial version and it offers a simple way of garping footages directly  from camcorder. And also it provides a attractive feature to join flawlessly and split accurately native MTS files for video file output with original MTS format.
    Maybe this is the tool cwhich an help you out, angelanna.
    Enjoy your video.

  • Automator--workflow to trash files also trashes the Automator app(!)

    To automate the trashing of extraneous plist files in my user account's Preferences folder, I built a little Automator app.
    The app properly finds the extraneous plist file(s) and moves it(them) to the Trash, but it also +moves itself+ to the Trash!
    What do I need to do differently in this Automator app (below) so that it stops trashing itself?
    Thanks in advance!
    Step 1—Find Finder Items (Search Preferences; All of the following are true; Name contains windowshadex; file extension is not plist
    Step 2—Get Selected Finder Items
    Step 3—Move Finder Items to Trash

    Dear Eric,
    Thank you very much for your prompt reply. I do really appreciate it. However I cannot find a workflow/applesript to do so. I am pretty sure it must not be very difficult but strange as it may seem I cannto come accross with ti.
    Best regards,
    José

  • Help moving files

    I'm trying to move some picture files from a pc to my new Mac pro. When intrybto view them I get acwidowcthatvsays thevfilevus in an unrecognized format.

    OK, I think I deciphered your post, but please try typing slower, or use a spell checker!
    If the files are already moved to your Mac, you could use a graphic converter program (e.g. GraphicConverter, but there are many others on the App store) to convert them to another format.

  • Help moving files from G3 imac (OS 8.7)

    Howdy. I recently pulled the old imac ( 1999) out of the closet and gave it to my nine year old daughter . It does not have any way to transfer data other than a first generation USB port. I've been unable to find a flash drive ( powered or not) or anything else which can move the files. Any suggestions would be greatly appreciated ( she really wants to move all the artwork and stories she wrote over to my computers so that she can print them up. Many Thanks.

    jjb3272,
    There are a lot of used USB printers out there that will work with that iMac. That might be the way to go for a nine year-old.
    I am wondering why the USB port does not seem to like the flash drives. Could you elaborate on what you have tried? Also, what used computer stores do you have in Tallahassee? A used USB zip drive would also be something to consider.
    Finally, have you tried getting the iMac back on line? That is the environment the iMac was advertised for originally.
    Jim

  • Archiving Strategies - Need Help moving files to DVD

    I have hundreds of images (.DNG) scattered across three drives that I want to archive to multiple DVDs. Is there a utility or an easy way of doing this?

    Hi,
    No!
    Is the simplest answer. You will need to spend time and decide which file goes where. Grab a coffee and.....
    Regards.
    Ian.

  • HT1364 Help moving files

    I don't see under file library the organization option in the new iTunes

    I wrote a program to do it. It only works if the duplicates are the exact same song file on your hard drive. If they aren't the same exact file, it won't do anything.
    http://home.comcast.net/~teridon73/itunesremoveduplicates.exe

  • AppleScript to skip Automator workflow step - when no files are provided

    My current Automator workflow:
    Get Specified Finder Items (path to folder auto-populating with images from a camera)
    Get Folder Contents
    Sort Finder Items - by Creation Date in descending order (gets oldest item first)
    Limit Number of Items - Limit to First 1 items
    Move Finder Items (If no items are passed to this step skip it)
    Loop - Automatically; Stop after 20 minutes; Use the original input
    What I am trying to accomplish:
    I'm trying to write an AppleScript to skip the "Move Finder Items action" when it is not supplied with any files (from the previous workflow step), moving on to the next step which is a loop to begin my workflow again.
    Big picture:
    I have a workflow, where I am moving files from one folder to another folder (one at a time). When the input folder is empty, Automator comes back with "No item references were passed to the Move Finder Items action (-50)"; which it should - because it is not passed any files. I would like to ignore this error (or skip this step) and continue with the workflow if no files are provided to the "Move Finder Items action". I currently have an AppleScript (see below) that stops the workflow when this error occurs, but I would like to have this flow continue, not stop.
    AppleScript:
    on run {input, parameters}
              if input is {} then error number -128 -- 'user cancelled'
              return input
    end run
    Please help me create a script to skip this step, or to restart the Automator workflow when no files are passed to  the "Move Finder Items action".

    I'm not aware of a way to do this with a workflow saved as an application, but Automator is scriptable, so you can manipulate a workflow document.  For an example, build the follwing workflow:
    Ask for Text (just to get some input)
    Run AppleScript:
    on run {input, parameters}
      set currentAction to index of current action of front workflow -- the most recent completed action
      if input is {} then -- if no input then disable the following action
        tell Automator action index (currentAction + 2) of front workflow to set enabled to false
      else -- enable it
        tell Automator action index (currentAction + 2) of front workflow to set enabled to true
      end if
      return input
    end run
    Ask for Confirmation (just to show a dialog when enabled - this action will be enabled/disabled based on the text input)
    Loop
    You can also use action names, but I think it is less confusing to use indexes, since names can be edited and an action can be used more than once.

  • Getting File Name in Automator workflow - combine PDF

    I am using Automator to combine 2 PDF files.
    I would like to inherit one of the file names in the new PDF and append a standard text to the front of the file name.
    I am not sure how to do this. I can combine the PDFs the way I would like, but I am not sure how to plick the file name.
    my workflow is as follows.
    Folder Action targets folder where 1st PDF is added(I want this FILE NAME).
    Ger Specified finder item selects 2nd PDF to be combined.
    Sort Finder Items makes sure the new PDF pages are ordered properly.
    Combine PDF Pages combines the pages.
    Move Finder Items saves the files where i want it.
    Name single item is whre i thought to add my standard text plus the variable of FILE NAME.
    Open File in mail to set up my email.
    Anyone can help with this?
    thanks,
    Aaron

    Here is an automator workflow that does something similar so I believe you can adapt to your needs.  This workflow is setup as a service workflow. It will combine PDFs in the order in which they are selected/clicked via the Shift key.  The default name of the combined output file will be the name of the first file clicked.  Automator can be activated by CTRL clicking any of the selected PDFs.
    1. Service receives PDF files in Finder
    2. Automator Action: Run AppleScript
    on run {input, parameters}
              display dialog "Files will be combined in the order selected via the Shift key" as text
              return input
    end run
    3.. Automator Action: Trim input items
    keep the first one
    you will need to download and install this autotmator action from here:
    http://www.menace-enterprises.com/Files/Automator/Actions/Trim%20Input%20Items.d mg
    4.  Automator Action: Run AppleScript
    (* Note & Definitions
    This Applescript extracts the basename of the first selected file without its .pdf extension
    "path_basename_ext" is full path and name, e.g. User/desktop/file.pdf
    "NmExt" is filename with extension, e.g. file.pdf
    "baseName" is the base filename without extension, e.g. file
    "Ext" is the file's extension, e.g. pdf
    on run {input, parameters}
              set path_basename_ext to input
              tell (info for path_basename_ext) to set {NmExt, Ext} to {name, name extension}
              set baseName to text 1 thru ((get offset of "." & Ext in NmExt) - 1) of NmExt
      baseName
              return baseName
    end run
    5.  Automator Action: Set Value of Variable
    define baseName as the variable
    6.  Automator Action: Get selected finder items
    Options: check ignore input
    7. Automator Action: Combine PDF pages
    choose Combine by appending
    8. Automator Action: Move Finder Items
    choose To: Desktop
    Options: check show this action when workflow runs
    9. Name Single Items
    choose Basename only to: baseName
    Options: check show this action when workflow runs
    10. Open Finder Items

  • Need help creating an AUTOMATOR workflow.

    Sorry if this is the wrong area, but I couldn't find an Automator specific category.
    I currently have a folder containing a bunch of avi's that I wish to convert for watching on an Apple TV.
    I currently use Visual Hub, but find that I occasionally get a bad encode from it.
    I was hoping to set up an automator workflow that does the following:
    1. Whenever an avi appears in a specified folder it converts is using Quicktime's Apple TV Export feature.
    2. Moves the new file to another specified folder.
    3. Add's it to iTunes.
    4. Deletes the original.
    If someone could help me out in writing the workflow, that would be awesome.
    Or even if you know of an already existing automator workflow that did this would be cool.
    Thanks.

    Open Automator.
    Choose Folder Action for the type of workflow.
    Set the folder you want to watch in the top gray bar (Folder Action receives files and folders added to)
    Click on Movies in the Library panel
    Drag Export Movie action to the right workflow panel
    Choose the output type and location. I wouldn't delete files until I know they work.
    Save the workflow.
    Now, just drag .avi's to the folder you chose in the first step. You will see the gear run in the menu and when it stops, the new converted files will be in the folder you chose in the Export Movie action.

  • I recently had a kernel panic in which I think my hard drive only had so much space left after I ran a bunch of drivers I thought I needed. I uninstalled all and moved files. For some odd reason I'm not getting sound of of my hdtv/monitor.HELP?

    I recently had a kernel panic in which I think my hard drive only had so much space left after I ran a bunch of drivers I thought I needed. I uninstalled all and moved files. For some odd reason I'm not getting sound of of my hdtv/monitor.HELP? I uninstalled all the drives and apps I download. I moived files either to trash if not needed, and others to other external drives. I went into disk utility and did a repair disk permission and verify disk. Clean out junk files. Now my hdtv/monitor does not give me any sound, nor does my mac mini. Can someone please tell me what to do?

    What drivers?

  • Automator Workflow Copying Files

    I want to create an Automator workflow that copy items to a destination folder but ignores files that already exist in the destination. I begin having trouble at the "Copy Finder Items" action where the only options are to replace existing files or create duplicates in th destination folder?

    My bad.
    Try this script instead:
    tell application "Finder"
              set source_folder to (choose folder with prompt "Choose the source folder:")
              set target_folder to (choose folder with prompt "Choose the destination folder:")
              if source_folder is not target_folder then
                        set the_files to every file of source_folder
                        repeat with each_file in the_files
                                  set file_name to name of each_file
                                  if not (exists file file_name of target_folder) then
      duplicate each_file to target_folder
                                  end if
                        end repeat
              else
                        display dialog "Choose different folders as source and target!" buttons {"OK"} default button 1 with icon stop
              end if
    end tell
    It does what the first one should have done - checks the name of each file against the files already in the source folder and only duplicates those which aren't already there.

  • Help-moved Domain.sites2 file, lost content wife's site

    Hi,
    This is about my wife's MAC so it is even more serious because it's my fault. I'm her IT guy but I don't know her iWeb projects very well. I helped her get started and once her site launched a year ago, all has been great and I stopped studying/learning iWeb. Now I'm in trouble.
    So asked for help creating/publish multiple websites from iWeb09. (personal and work) Don't know if she'll publish as sub/site on her mobileMe or host the second site elsewhere. I read the forums this morning about iWeb's use of the Domain.site file. I read that if you move the file from it's default location (lib/app support/iweb) to another level in the Finder, then iWeb will open to a new site template and no longer default to her personal site. Okay, got it. Did it. Created a folder called "iWeb Sites" in the Library/Sites folder. Created folders for her sep sites, work / personal.
    Then I moved Domain.sites2 to the new "personal" folder. Launched iWeb from there to check her site. All good - still there. Quit iWeb
    Re-launched iWeb from dock, saw it create a new Domain.sites2 file in lib/app support/iWeb. I chose "New Site" in the menu. After it appeared, I deleted her Site icon (and the files under it went away). Okay, good, now this Domain.sites2 file is ready to be her new work website. Quit, and movd this Domain file from it's default (lib/app supp/iWeb to the new "work" folder.
    Now the problem...(if you don't already see it coming). I went back to open her personal site to make sure it would open directly from the new "personal" folder - it's new home. It opened with NONE of her site info. Totally new site - all her content gone.
    First thing I did was quit. Opened my ftp (cyberduck) went to her mobileme account and downloaded the entire "SITES" folder.
    Now what? Where did I go wrong and how do I fix it?
    Thank you!

    The first time you open iWeb it creates a Domain.sites2 file in :
    ~/Library/Application Support/iWeb/
    where ~ is your Home directory.
    Anything you do in iWeb is stored in that file.
    When you move the file to another location, for reasons only you know, iWeb cannot find it and offers you to find the Domain file or create a new one.
    You can also double click the file you moved to open it in iWeb.
    iWeb will remember it the next time you open iWeb.
    If you start moving files around and creating folders for whatever reason and lost track, then retrace your steps to the point where it went wrong. If in the process you created multiple copies, then open them one by one and see what's inside.
    You can have multiple domain files, I have 57, for any reason you desire. They are not linked and are fully independent of each other. It's up to you how you organize these different files and remember what they are for.
    If you publish the Sites in each domain file to MobileMe, then the last one published will be the default Sites. If Sites in different domain files have the same name then it is surprise, surprise which page will be deleted, updated or added on the server.
    Downloading the Sites (the HomePage folder) or the Web/Sites folder (where iWeb publishes the pages) from iDisk is useless in this respect, since it does not contain anything usefull. You cannot import webpages back into iWeb.
    [The concept of iWeb Sites|http://homepage.mac.com/wyodor/.Public/The concept of iWeb Sites.pdf] (pdf)

  • I am using a late 2008 macbook and have recently purchased a WD Passport Ultra 1TB to use for storage.  I have formatted the drive and successfully moved files onto the drive, however now I am unable to locate the drive within FINDER. Please HELP!

    I am using a late 2008 macbook and have recently purchased a WD passport ultra 1TB drive to use as storage.  I have successfully formatted the drive, and moved files from macbook onto it, however now I cannot locate the drive within FINDER, even though it is showing within disc utility.  Please HELP!!!!

    Welcome to Apple Support Communities
    Open a Finder window, and your external drive should show up in the sidebar, under "Devices".
    A different way is to go to Finder menu (in the menu bar) > Preferences > General, and tick "External disks". If your external drive is detected by OS X, it will show up at the top right corner of Desktop, so double-click it to access to the content.

  • Hiding Files Via Automator Workflow

    Is there some way I can make an Automator workflow that will hide a file/folder?
    Thanks,
    Mason

    Found my solution over here.

Maybe you are looking for