Adding action to particular kind before moving files

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I have an action which moves any file to a different folder, is it possible to add an action that if the kind is an image I can run an automator workflow before moving the file? I still want the action to move files that are not images.
Allsop
 
Posts: 67
Joined: Thu May 01, 2014 1:43 am

Just add the rule to do that, making sure that it is earlier in the list than the rule that moves all files. Since the first rule to match is the one that gets executed, since that rule matches everything, it's probably best to have that at the end.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks, easy!!! :oops:
Allsop
 
Posts: 67
Joined: Thu May 01, 2014 1:43 am

Cancel my last posting!!! It works fine except that the action now converts everything to a jpg, that is includng pdf files which is not what I want. What I want to achieve is that only image files are converted to jpg but everything else remains in the original format, so if I put 2 files in the folder and one is a tiff and the other is a pdf the tiff will be converted to jpg but the pdf will remain as a pdf.
Allsop
 
Posts: 67
Joined: Thu May 01, 2014 1:43 am

Can't say without seeing your rule but it appears you rule to convert the file is not filtering on the right types. Use the preview to fine tune your conditions until everything matches what it should.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hi,
Wish I could include a screen shot! My Rule is:

If any of the following conditions are met
Any File
Kind is image
Do the following to the matched file or folder:
Run Automator workflow JPEG Conversion
Move to folder Inbox
Display notification with pattern File file moved to DTPO inbox

In Preview I get:

File Rule Matched
Image Name Move to DTPO
Document Name Move to DTPO

NB. These are uncoloured in any way and if I click on them they are highlighted yellow.

Thanks for your help
regards.
Allsop
 
Posts: 67
Joined: Thu May 01, 2014 1:43 am

"Any file" doesn't really make sense if it's not by itself. In addition, you have it set to match "any". That means that rule will match everything since "any file" always matches. I suggest either getting rid of "any file" or change it to "all".
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

We seem to be going round in circles here! You are now telling me not to do what you told me to do in your first reply which was to "Just add the rule to do that, making sure that it is earlier in the list than the rule that moves all files. Since the first rule to match is the one that gets executed, since that rule matches everything, it's probably best to have that at the end.” Perhaps it is because I have not explained myself well enough.

Plain Text Document>>>>>>>>>
FOLDER with Hazel Action to move contents
.tiff File>>>>>>>>>>>>>>>>>>>

I want to convert the .tiff File to a .jpg and only then run the rule to move both files. Obviously the Plain Text Document must not be converted to .jpg

Thanks for your patience.
Allsop
 
Posts: 67
Joined: Thu May 01, 2014 1:43 am

I pointed out your rule was incorrect. Your rule was matching every file, hence everything ended up being converted. If you use "any" with "any file", it's going to match on matter what you throw at it. Fix that first before doing anything else. Also, what you just posted is more cryptic. Maybe you should post screenshots of your rules (use an image hosting site like imgur.com).
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support