Delete file after conversion

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

Moderator: Mr_Noodle

Delete file after conversion Thu Nov 13, 2014 4:09 pm • by 4500
Hi all,

I'm really stuck with one part of my file conversion rule. I have Hazel convert FLAC to MP3, but I'd like it to delete the FLAC after conversion, nothing I've tried seems to work so far. Any ideas?

My rule is:

If any
Kind is Folder
Extension is flac

Do the following to the matched file of folder
open with application: XLD
--- then how to delete the FLAC after XLD has converted?

Thanks in advance.
4500
 
Posts: 3
Joined: Thu Nov 13, 2014 3:59 pm

Re: Delete file after conversion Thu Nov 13, 2014 6:24 pm • by 4500
Ok... so I have found XLD has a "delete source after conversion" which is perfect for what I want so original problem solved.

But after testing in a test folder (the folder i want to use this on is my music download folder so there will be a mixture of both formats) with MP3's it seems Hazel is also sending them to XLD and not recognising "extension is flac". I've also tried Kind is but there is no option for FLAC in the other box. So any ideas how i can get Hazel to convert only the FLACs.
4500
 
Posts: 3
Joined: Thu Nov 13, 2014 3:59 pm

Re: Delete file after conversion Fri Nov 14, 2014 4:56 pm • by Mr_Noodle
Your rule is incorrect in that you are matching both folders and FLAC at the same time. There is no way a file can be both a folder and a valid FLAC file (unless FLAC files can be file packages). You need to correct that logic in your rule.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Delete file after conversion Fri Nov 14, 2014 5:42 pm • by 4500
Ah yes, i see. Thanks for getting back to me.
4500
 
Posts: 3
Joined: Thu Nov 13, 2014 3:59 pm

Re: Delete file after conversion Fri Sep 29, 2023 10:18 pm • by Green Rain
Found this thread as I am trying to do something similar: I have a folder that will contain TIFF files that are converted to HEIC files. I want Hazel to intelligently delete the TIFF files as the HEIC files appear. My conversion program does support an option to delete the originals, but I do not want to enable it as I occasionally use it for files where I do not intend to delete the originals. Is there a way to have Hazel identify that there is another file with the same name, and trigger based on seeing the duplicate name?
Green Rain
 
Posts: 1
Joined: Fri Sep 29, 2023 10:13 pm

Re: Delete file after conversion Mon Oct 02, 2023 9:07 am • by Mr_Noodle
You really should post a separate topic as it's only superficially related to this one.

Look up nested conditions in the manual. You can create one where you match a file based on another file in the same folder. You can do a condition like:
Code: Select all
If (all) are met
    Extension is tiff
    If (all) are met for (any file or folder in the same folder)
        Extension is heic
        Name matches (name)

That will match a tiff file if there is another file in the same folder with the same name.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support