Automator's Filter Finder Items behaves incorrectly

Can anyone confirm the misbehaviour of the Filter Finder Items in Automator when set to filter items whose date created is not in the last 7 days?  I have a workflow being used as a folder action to keep my downloads folder tidy but never runs right as it gets rid of content that I've just downloaded.
Link to workflow: http://cl.ly/1S0h1I3m3r1t3l2a1W1J
Insight would be appreciated.

The only reliable way to do that would be to take an inventory of the filesystem, and compare it with an earlier inventory. I don't know of any easy way to do that with built-in tools. If you use Time Machine, there are third-party tools such as BackupLoupe that compare snapshots. Or you could try something like Uninstaller, though it's quirky and doesn't seem to be maintained much anymore.
At an advanced level, there are UNIX tools such as mtree, which is built in, radmind, or tripwire, but you probably don't want to go there. I use radmind and mtree for different purposes, but they're not for the squeamish.

Similar Messages

  • Automator - Filter Finder Items filtering contents of sub folders

    I have an external hard drive and I want to keep my iTunes music library automatically backed up on it. I am using automator to copy my most recent files to the external (run the script once a week). I let iTunes manage all my audio files, etc so I figured the created, modified, opened dates would be the best way to filter the items I want to copy over. The workflow is as follows.
    1) Get Specified Finder Items (iTunes Library Music folder)
    2) Get Folder Contents (All artist directories (Repeat for each subfolder found is NOT checked)
    3) Filter Finder Items (ANY of Date Last Modified, Date Created, Date last opened in the last week)
    4) Copy finder items (to my external hard drive)
    I am having two problems.
    1) If I play a song from my second hard drive iTunes copies it into it's directory when it opens... iTunes Music > Artist > Album > Song.mp3. The mp3's modified date, created date, and last opened date is the same as the file that got copied. The new Artist and Album directories that were created by itunes have current created dates (makes sense). However, the filter is still not catching it. Only if the mp3 is current will the filter catch it. I DON'T have 'Repeat for each subfolder found'... shouldn't the filter check for the folder's modified, created and last opened dates?
    2) If everything works the way I want it to I see this to be a problem in the future. If I add an album by an artist that I already have an album for, the filter will skip it. Any suggestions on how I could handle this problem?
    Thanks.

    Found out that since Hebrew was set up first in the language option the filter on textual was failing. After I changed the order of the languages in the language preferences the file filter by name, extension etc… worked O.K.
    Nati

  • Automator Filter Finder Items

    A very simple task, which I have attempted to figure out many times over the last few months; but my repeated attempts haven't been successful. This should be easy for someone to resolve…
    I would like to strip out all the files of a certain extension (.txt) from an hierarchy of nested folders, & move them to the Trash. (Told you it was easy!)
    Here's what I think ought to work:
    • Create an Automator Workflow
    • 'Ask for Finder Items' to select the topmost folder
    • 'Get Folder Contents' with 'Repeat for each subfolder found' — (the results successfully include all the relevant files)
    • 'Filter Finder Items': "find files where any of the following are true: file extension is .txt" — (I tried "txt" as well as ".txt")
    • 'Move Finder Items to Trash'.
    The files turn up (alongside loads of other junk) in the 'Get Folder Contents' step, & they are reported in the results; but when I try to filter out everything apart from the .txt files, so that only the .txt files remain, the filter reports no results.
    So the 'Filter Finder Items' action completes with no results, & with a warning that: The action “Move Finder Items to Trash” was not supplied with the required data.
    I think it must be something obvious, but I can't figure it out, & although I've searched extensively online, everyone else with similar problems has other complications which get resolved… so they lose interest just at the point where I think they're going to reveal the solution.

    You need to understand the issues here. Automator was released with 10.4 (Tiger), and many of the core automator actions date from that time.  This introduces forward-compatability problems: things that should work (and maybe did work) in 10.4 might not work as specified in 10.6, depending on if/how the underlying cocoa APIs have changed.  Now, in the best of all possible worlds, Apple would update automator actions with each new upgrade, but it's probably not needed for the bulk of the actions, and Apple may not be aware of problems that do exist with given actions (that depends on whether people filed meaningful bug reports on them).
    Don't be confused by the seeming simplicity of what I did: the Move Finder Items to Trash action probably uses cocoa file system APIs directly, whereas my applescript leverages the developed programmatic underpinnings of the Finder - the Finder has a built-in system for moving files in bulk, whereas the action is obviously moving files one at a time (which is where things are getting congested).
    Filter Finder Items seems to be a simple metadata search (just another use of the spotlight framework, which hasn't changed much since its inception) so I can't see any way in which it would fail.  it is, of course, limited by the same things that spotlight is limited by - it won't find material that's not indexed and may not do exactly what one always expects (e.g., may not recognize an extension as an extension unless the extension belongs to an app registered with the system) but other than that there's very little it can do wrong.  As a general rule, actions that deal only with manipulating automator data (e.g. modifying references passed from one action to the next) won't break.  You'll only see breakage with actions that need to access exterior frameworks that have changed significantly since the actions were created. 
    That's the best answer you're going to get: one can't prove a negative, so there's no way to demonstrate that FFI isn't broken.  it's easy enough to check for a given task, though - just run the workflow you have on a test folder without the deleting action, check the results window, and compare it to the results you expect (which you can gather by eye in a Finder search window, through an applescript, through an app that will report the number of files of given types in a folder…). 

  • Automator - Filter Finder Items bug?

    I've only started using Automator a few months ago, but now I ran into a problem, which I think is not my fault, but is a bug in Automator.
    Here's the scenario:
    What I have is a Folder Action on the Downloads folder, and the following list of actions in order:
    Get Finder Items: how.i.met.your.mother.s04e05.srt (this is for testing purposes)
    Filter Finder Items - if ANY of the following are true:
    Name contains "big.bang.theory"
    Name contains "how.i.met.your.mother"
    Name contains "fringe"
    etc
    I managed to find out that the same kind of container (here: Name) could not be used multiple times, because it gives no result in case "Any" of them are true. There is no way to test if any of these strings are present in the file name. I thought I could use this action like a function with "OR"-separated boolean parameters, but apparently that only works if I change the container type, e.g. I use Kind instead of Name. Meaning, if there is only one Name container, then it outputs the correct result (the .srt file, if the statement is true).
    So, did I do something wrong, or is this really a bug in Automator? If you have an alternate suggestion on how to solve this, please don't hold it back

    I have the same problem.
    I am trying to select ANY of the following extentions: JPG, PNG, TIFF and I get no output. While if I only select one extention I do get the right output for the extention selected.
    ANY of the following are true
                   File extention          is          JPG
                   File extention          is          PNG
                   File extention          is          TIFF
         ~~~no results produced~~~
    ANY of the following are true
                   File extention          is          JPG
         ~~~001.JPG, 002.JPG, etc..~~~

  • Is there a bug in Automator filter finder items?

    I'm trying to do a batch processing script and there seems to be a bug with items created earlier in the script.  For example, the 2brokegirls.jpg file was created earlier in the script and added to the main folder whose contents can be seen in the get folder contents action at the top.  however, the filter finder items misses that item when filtering by the extension ".jpg" which as you can see obviously appears at the top.  Is this a bug in Automator?  My guess is that the filter is using some spotlight indexing and that index hasn't been updated since the file was just added.  Does anyone know of a workaround?
    Thanks.

    I also have this problem. I am getting literally hundreds of emails each day althoug i have clicked all the radio buttons to not receive any emails in "my preferences... email notifications. THis is gumming up my Ipad, Iphone and email in box Help!!

  • "Filter Finder Items" not working properly

    I'm taking my first crack at Automator, and while I've made good progress, one of the built-in actions, "Filter Finder Items", is just not behaving predictably. Basically, I'm doing the following:
    1) Get selected finder items - pulls a selected folder
    2) Set variable - this gives me a variable for the name of the folder we're working with
    3) Create a new folder inside the selected folder
    4) Get folder contents of selected folder
    5) Filter for three different file extensions - here's where my problem starts
    6) Move the filtered files into the new subfolder (though it really seems to be copying, which necessitates the following steps to get rid of the original files)
    7) Get contents of selected folder again
    8) Filter on the same three files extensions - this time it works properly
    9) Move filtered files to Trash
    For some reason, the first filter action doesn't seem to be working at all - if I have 15 files in the selected folder, but only three that match the filter, all 15 will be copied to the new subfolder. The second folder action will then, inexplicably, work exactly as it should and move the proper files to the Trash.
    Does anybody know why this action doesn't want to cooperate? Has anybody else seen something similar?
    Thanks for any hints/help.
    Rick
    Message was edited by: rnb2

    Saving the workflow as an application should be all that is needed, but the first action (the one that gets the items to work with) may not be correct for your usage. If the first action is *Get Selected Finder Items*, unfortunately the selection would be the application itself, since that is what was most recently selected.
    In this case, the application can be dragged onto the Finder's toolbar (where it will work with the current selection), otherwise the first action can be removed and the application used as a droplet (items dropped onto the application are passed to the workflow) or a Finder plugin.
    The first action can also be replaced with an *Ask for Finder Items* action (ignoring input).

  • Filter finder Items... broken? (also request to help streamline script)

    Let me begin by saying that I've done the SAME THING for a long time with this Automator script, and it's worked flawlessly. I recently added some now automator actions (and later deleted them) thinking they were the culprit of why my "filter finder items" was showing no results, but I'm not sure at all at this point.
    Here's the script (that has been working fine until at least the 7th):
    It's long, so bear with me (I use this script to install custom Sims2 content when I download it:
    ("Get Specified Folder" uses the "Get specified finder items" action, I just didn't want to type that every time).
    New Folder: Recent (in my downloads folder)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains .package)
    Copy Finder items (to Recent)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains Sims2Pack)
    Move finder itmes (to my core download folder (they're generally in subfolders after downloading, as are the .package files)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains Sims2Pack)
    Copy finder items (to Recent)
    Get Specified Folder: Recent
    Create Archive (on desktop named Sims2)
    Rename (add date to end of file name)
    Rename (add time to end of file name)
    Get Specified Folder: Recent
    Move to trash
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains .package)
    Move finder items (to Sims2 Downloads folder, which installs the custom content, replacing any repeats)
    Get Specified Folder: my downloads folder
    Get folder contents
    Filter finder items (name contains Sims2Pack)
    Move Finder items (Sims 2 Packs folder within the downloads folder... these items must be installed into the game by double-clicking on them.)
    Get Specified folder: Desktop
    Get folder contents
    Filter finder items (name contains Sims2)
    Move Finder items (To Backup)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains MTS (most of the containing download folders (after they've been expanded by another automator script, have this at the beginning of the folder name due to where I commonly download my custom content)
    Move to trash
    And that concludes the script. I know it could probably be streamlined (another reason I'm posting the whole thing) but it worked until very recently, and I don't know what could cause it to no longer report results after filtering within the subfolders while within the main folder works fine.
    To clarify, it's recently been simply deleting the MTS folders and creating a "Recent" folder and archiving it but it's empty. So the script is not filtering for the Sims2Pack data nor the .package data as it used to.
    I haven't modified the script, and I've deleted all actions that I downloaded recently (backed them up in case they're not the culprit). Also ran disk permission repair but nothing was repaired in regards to Automator.
    Thanks.
    iMac Intel   Mac OS X (10.4.7)  

    Here is an update to the script, however filter continue to not work as it once did.
    New Folder: Recent (in my downloads folder)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains .package)
    Copy Finder items (to Recent)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains Sims2Pack)
    Move finder itmes (to my core download folder (they're generally in subfolders after downloading, as are the .package files)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains Sims2Pack)
    Copy finder items (to Recent)
    Get Specified Folder: Recent
    Create Archive (on in "to backup" named Sims2)
    Rename (add date to end of file name)
    Rename (add time to end of file name)
    Get Specified Folder: Recent
    Move to trash
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains .package)
    Move finder items (to Sims2 Downloads folder, which installs the custom content, replacing any repeats)
    Get Specified Folder: my downloads folder
    Get folder contents
    Filter finder items (name contains Sims2Pack)
    Move Finder items (Sims 2 Packs folder within the downloads folder... these items must be installed into the game by double-clicking on them.)
    Get Specified Folder: my downloads folder
    Get folder contents (repeat for each subfolder found)
    Filter finder items (name contains MTS (most of the containing download folders (after they've been expanded by another automator script, have this at the beginning of the folder name due to where I commonly download my custom content)
    Move to trash
    I removed the step where it was saving it to the desktop. If the filters ever work again, this should therefore go faster than before.

  • 'Filter finder items' by variable

    Hi,
    Is this just a flaw in Automator or am I being a n00b? All I want is to filter finder items (name) by a variable set earlier in the action. This should be a gimme, right? Wrong. No worky.
    Anyone know why / how to get this working ?
    thanks in advance

    An action needs to be written to use variables (specifically, a different kind of text field is used), and not all do. Several of Apple's actions are from a time before variables, so they probably just haven't been updated to use them yet.
    You might check out this macosxhints article, but it doesn't always work.

  • Multiple Extension in Filter Finder Items

    Does anyone know how to make Filter Finder Items filter for more than one extension? For example, if I want to make a script filter for MOV, AVI, and WMV?

    Well, it sure would be nice if the filter action would do that for you directly, but since it doesn't there are a few alternatives. You can use a Run AppleScript action to do the filters, a Run Shell Script action to do the filters, or use a bunch of Automator actions that do each of the specific filters and combine the individual results:
    Tested workflow:
    1) Ask for Finder Items (Type: Files, Allow Multiple Selection, Ignore Input)
    2) Set Value of Variable (Variable: Source Items) -- store the original items
    3) Filter Finder Items (Whose: Name Extension is equal to mov)
    4) Set Value of Variable (Variable: MOV items) -- store filtered MOV items
    5) Get Value of Variable (Variable: Source Items, Ignore Input)
    6) Filter Finder Items (Whose: Name Extension is equal to avi)
    7) Set Value of Variable (Variable: AVI items) -- store filtered AVI items
    8) Get Value of Variable (Variable: Source Items, Ignore Input)
    9) Filter Finder Items (Whose: Name Extension is equal to wmv)
    10) Get Value of Variable (Variable: MOV items, Accept Input) -- add the previous filtered items
    11) Get Value of Variable (Variable: AVI items, Accept Input) -- add the previous filtered items
    12) View Results (or continue with the rest of the workflow)
    Note that the Accept/Ignore Input item will let you combine or isolate the action from the results of the previous one.

  • Automator - how reset Finder Items?

    I want to to defrag a big file, so I have thought to copy the file in an external disk, than rename the file in external disk and copy to directory in which there is the file to defrag.
    Than revert to the original name the file in the external disk.
    In this way I have a copy of the file in external disk and the original file and the file copied in HD.
    I do that to avoid failure of external Hard Disk that could have the result to destroy the original file if this happen during the copy from external to internal HD.
    I have made a workflow that do this:
    1) Get Specified Finder Items (pictures/file)
    2) Copy Finder Items (to DK1)
    3) Rename Finder Items (DK1/file to DK1/filecopy)
    4) Copy Finder Items (to pictures)
    5) Get Specified Finder Item (DK1/filecopy)
    6) Rename Finder Items (DK1/filecopy to DK1/file)
    The problem is that in the 5 step the item passed to the 6 step are two (pictures/filecopy and DK1/filecopy).
    I want only DK1/filecopy.
    I have seen that Item passed to various step are:
    1) Get Specified Finder Items (pictures/file) >>passed picture/file
    2) Copy Finder Items (to DK1) >>passed DK1/file
    3) Rename Finder Items (DK1/file to DK1/filecopy) >>passed DK1/filecopied
    4) Copy Finder Items (to pictures) >>passed pictures/filecopied
    5) Get Specified Finder Item (DK1/filecopy) >>passed two pictures/filecopied and DK1/filecopied
    6) Rename Finder Items (DK1/filecopy to DK1/file) >> in error
    I have have tried to make two workflow one with the step from 1 to 4 and another with the step 5 and 6.
    If they run separately all is ok, but if they run in a single workflow (that is made with the step from 1 to 4 and the 5 step that recall the second workflow) happen the same thing that I have described before.

    Stanley Horwitz wrote:
    I have been working with Macs since 1986 and in the IT industry full time since about the same time and I honestly have no clue what you are attempting to do. What does "defrag a file" mean and why do you want to do that?
    I want to copy a file to an external device, so system, copying file, write this without fragmentation, and then copy to original location.
    In this way the result is to have the file unfragmented.
    If you want to defrag your disk, by far the easiest and quickest way to do that is to take another disk drive that's as big or bigger in capacity as the disk you want to defrag, then format that disk, then simply use your favorite disk cloning tool to copy the contents of the disk you want to defrag to the other disk. The copying process to a newly formatted disk will write the data in an optimum manner onto the disk without any fragmentation on the destination disk. You can then, if you so desire, reverse the process and clone the cloned drive back to the original drive and you will end up with two defragmented disks with the same data on them. The biggest benefit to this strategy is that you get a complete backup of the contents of the disk.
    OK, but I only want defrag 1 file, not all the disk.
    If You see, I want the same manner that You suggest for the entire disk, applied only to 1 file.
    There are also several utilities that will do disk defragmentation such as TechTool Pro and Disk Warrior. I think though that in all but the most extreme cases, it is a wast of time to use those utilities to defragment a disk. In fact, in most cases that I have seen on home Macs, the benefits of defragmentation are minimal at best, which is why I suggest simply doing a backup of the disk to another disk, because the big benefit there is that you have a fresh backup which is far more important in most cases than defragmenting a disk.
    OK, I don't want defrag utilities, because I am not confident in the process.
    For backup I use regularly Time Machine on two external disks.
    All the matter is only to know if there is a manner to tell Automator wich is the file to use during the workflow.
    Thanks.

  • The action "filter finder items" encountered an error

    I am trying to run an AutoMator script and keep getting this error.   I've read some links on this site, one of which said to open up Spotlight and make sure the file I am trying to open exists.  It does Not.  This is an .indd file (Acrobat Indesign).  It is not in the Spotlight list of apps.  How do I add it?   

    After some more troubleshooting, I figured my problem statement is incorrect. Here is what seems to be the right one:
    I was using 2 filter expressions on the filter action: Extension is mp4 or extension = mkv. This always resulted on the error.
    But when I use only one expression (filer only one file extension) it works fine as long as there is only one file with that extension on the folder being analysed...
    For example, if have 2 mp4 files, I get the error...
    Any hints?
    Thanks.

  • Automator does not find items accurately using date stamps

    Greetings
    I am trying to write a simple workflow using Automator. Just check the creation/modification date of some files, and then do some work with them.
    It does not do the job right.
    If I ask for the files created or modified today, it finds well the files it has to find.
    But if I ask automator to find files created or modified last n days or weeks, it fails to select the proper files.
    Even worse, if I order it to select files, say, modified before july AND after august, it select files, when it's impossible a file can be last modified, created or whatever according that clausule.
    My system is an iMac bought on summer of 2011, with Mountain Lion 10,8,1 (I'll upgrade next week, after backing up all my stuff) and catalan language. I am stating that last bit because I wonder if there's an issue with the day/month/year date format we use around here, instead of month/day/year
    TIA

    What was your solution? I'd would love to know how to get Pages to work with Automator. What I want to do is import Word (doc)s to Pages and then export out to (pdf)s.

  • Automator 2.2 "Copy Finder Items" Action Error

    Hello all,
    When I try to create an Automator workflow that finds a type of file (pdf) in a nested folder structure and copies those files to another folder - essentially extracting the pdfs from their nested folders - I get an error message.
    1) I use the "find Finder items" action. I specify the top-level folder and set the kind to "document"
    2) It returns 56 items
    3) I use "copy Finder items" action and specify a new folder
    4) The copy action fails stating that a given file "couldn't be saved in the folder". It does not always error-out on the same file. Changing or creating a new folder doesn't help.
    I have tried this under two user accounts with the same result. I have tried deleting preferences. The same error results.
    Any ideas?
    I am running 10.7.1 on a 15" MacBook Pro, early 2011.

    I was having the same issue.
    I found another solution: instead of copying files, you could move files.
    1) Duplicate your original folder (unless you want to move/extract your files entirely to the new folder) (right click the folder and select duplicate)
    2) Create a new folder as the destiny folder
    3) Open automator and use the following actions (in order) on the workflow
    - Find Finder Itens (browse to your source folder; select "any"; select "extension"; select "end with"; type "pdf") (you can do the same thing with the actions "get specified finder items" combined with "filter finder items")
    - Get Folder Contents (and mark repeat for each subfolder found) (use this action if you have subfolders)
    - Move Finder Itens (browse to your destination folder, that you created previously)
    Now you can delete the duplicated folder.

  • Automator - Filter Finter Items

    Hi guys... need some help!
    I'd like to create a simple workflow that would select my recent files (from a very big folder) from the past month (or two) and copy them into another folder! I've looked but there's no option (that I could find)....
    Can anyone help me ?
    Thanks in advance.
    Nuno.

    message sent to red_menace:
    Hi red_menace, Thanks ! I had a look at your webpage and found just what I was looking for. You've created an excellent Automator action that does exactly what I was looking for (Filter Finder Items by Age). I will certainly look more "deep" at you webpage. Thanks once more. Nuno

  • [Automator] Using an ls command and then getting the finder items?

    So i want to make an automator app that looks for all external hard drives and then ejects them. Unfortunatly to my experimentation you cant use the finder actions to search in the root directory so i simply added a shell script with
    ls /Volumes
    which works.
    then i have a Filter finder items so it doesnt try to eject the Macintosh HD
    then i have eject Disk.
    The problem lies in that the shell script does not spit out finder items to the filter so the filter throws a warning because it isnt supplied the required data.
    My question is, how do i get the shell script to pass down finder items to the filter so everything else runs through smoothly?
    EDIT: i have python installed if that helps for simplicity i also know a small bit of C
    Thanks
    Tom Copcutt

    Where did he say that? He only stated that he wanted to avoid ejecting the HD, which isn't possible in any case.
    If avoiding .dmg is the issue, one way would be to hard code the possible disk names by using a list like this:
    Replace the example volume names with your own volume names inside the curly brackets below;
    Names must be quoted and comma separated as shown.
    Spaces in names ARE allowed. You can name as many or as few volumes as you wish.
    set gDiskList to {"External1 500GB", "Time Machine HD", "External2 HD", "External3 45GB"}
    repeat with i in gDiskList
              set i to quoted form of i
          try
                        do shell script "diskutil umount " & i
              end try
    end repeat

Maybe you are looking for