Page 1 of 1

Delete source folder !?

PostPosted: Mon Dec 02, 2019 9:40 am
by rabu
Hi all,
I have a question for you. Maybe someone has already done that.
I would like to have a rule with the following features.

Either
When a file is moved from a folder, the source folder should be completely deleted.
Or
When a file is moved from a folder, the source folder should be marked with a color.
Then I can delete all colored folders.

Best regards
rabu

Re: Delete source folder !?

PostPosted: Mon Dec 02, 2019 1:57 pm
by Mr_Noodle
You'll need to have Hazel monitor the folder containing the folders you want to remove/color. Aside from that, I'll need more concrete details about your workflow.

Re: Delete source folder !?

PostPosted: Mon Dec 02, 2019 6:30 pm
by rabu
My workflow is relatively simple.

I have a folder, let's call it "work".
The folder is empty.
Other folders are automatically created in this folder. (ftp upload)
After 5 minutes pdf files will be uploaded to the subfolders. (ftp upload)
Then I filter out important pdfs. (move to my drive)
After moving my files I want to delete the folder.

I cannot use the rule to delete empty folders. The folders are not always empty. Even if I empty the folders, it doesn't work because I can't delete empty folders. Then I would delete the empty folders before the pdf files are uploaded.

So after moving the file I have to select the folder so that I can delete selected folders later.

Re: Delete source folder !?

PostPosted: Tue Dec 03, 2019 1:11 pm
by Mr_Noodle
If the folder isn't empty, what is in them? How do you distinguish them from folders that shouldn't be deleted?

Re: Delete source folder !?

PostPosted: Fri Dec 06, 2019 3:39 am
by rabu
First a folder is created via fpt, where pdfs are uploaded.
Then I filter out the pdfs that are important for me and then I want to delete the rest.

So I need the function, if file has been moved, the source folder should be deleted.

I've tried a lot in the last days and I haven't found any rules yet. So I did it differently now.
First move the pdf. Then delete the new rule everything in the folder. Then delete empty folders.
Somewhat cumbersome but it works.

Re: Delete source folder !?

PostPosted: Fri Dec 06, 2019 12:07 pm
by Mr_Noodle
You can try using nested conditions. You can have a condition match a folder based on conditions for the files within it. You can then have it match the folder is it lacks a certain file.