Does sorting necessarily mean putting in the garbage can?

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

Moderator: Mr_Noodle

Hello,

I have a question about the rules, copying and sorting into subfolders.
Image
Today, my rule works the way I want it to. But I notice that my recycle garbage can fills up every time I use the rule...
But I don't like it. Because it fills up my recycle garbage can :)

Is there any way to avoid this? Like if the file already exists, do nothing?

Thanks for your help.

---

Bonjour,

De trier, oblige forcément de mettre à la poubelle ?

J'ai une question concernant les règles, la copy et le trie dans des sous dossier.

Aujourd'hui, ma règle fonctionne comme je le souhaite. Mais, je m'aperçois que ma corbeille se remplie à chaque utilisation de cette règle ...
Mais, ça ne me convient pas. Parce que justement cela rempli ma corbeille :)

Y a-t-il un moyen d'éviter ça ? Genre si fichier déjà existant, ne rien faire ?

Merci de votre aide.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

What is it filling up with?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:What is it filling up with?


Just in case, let me explain my rule.
It checks a file for invoices. If the invoice matches the CSV, then it renames the file and moves it.

I've noticed that there's a difference in the options between copying and "sort into subfolder".
One allows you to do nothing if duplicates (the copy), the other deletes if duplicates.
Of course, if the box is checked.

The garbage can fills up with files that I imagine would be duplicates, linked to the duplicate option.

But, if that's the case, how do I make my rule so that duplicates don't go into the trash, when I'd rather check if the file exists and if so do nothing, but I don't see how...

---


Au cas où je vais expliquer ma règle.
Celle-ci vérifie dans un dossier les factures qu'il contient. Si la facture correspond au CSV, alors elle renomme le fichier et le déplace.

Je m'aperçois qu'il y a une différence dans les options entre la copie et le "sort into subfolder".
L'un permet de ne rien faire si doublons (la copie), l'autre supprime si doublon.
Bien sûr, si la case est coché.

La poubelle se remplit de fichier qui serait en double j'imagine, lié à l'option de doublon.

Mais, si c'est ça, comment faire ma règle pour éviter que les doublons ne partent à la poubelle, alors que je préférai vérifier si le fichier existe et si c'est le cas ne rien faire, mais je ne vois pas comment…
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Can you click on the options button for the Copy action and post a screenshot of it?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Can you click on the options button for the Copy action and post a screenshot of it?

Image

Image
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

So you want the file to remain in the # Compatibilité folder?

If you don't want the rule to trigger over and over, it's best to structure the conditions so that it doesn't match after the first time. There are several ways to do it but one simple one is to set a tag on the file which you can then check for.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:So you want the file to remain in the # Compatibilité folder?

If you don't want the rule to trigger over and over, it's best to structure the conditions so that it doesn't match after the first time. There are several ways to do it but one simple one is to set a tag on the file which you can then check for.


Ok, I understand. Well, it forces me to tag old files or set a rule start date that I'll change every time.

Do you have any other solutions?

However, both options might be valid for an update in the options of an already existing file. So "do nothing" or "delete".
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Again, do you really want the file to be left at the top level? "Delete" is not an option as Hazel only deletes things outright after they are in the trash.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Yes, I want it to stay in the original folder.
And, I need a copy for the accountant in a synchronized folder.

I think it's a translation error, I was talking about putting in the trash when I said deleted.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

Thanks for the clarification. Is this the same file every time or is there a new file being added/created with the same name over and over?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Thanks for the clarification. Is this the same file every time or is there a new file being added/created with the same name over and over?


So the file looks like this: date(yyyymm) label price.pdf so only the label remains the same.
Then a first rule renames and sorts the file into a folder with the same name as the label.
And then the sorting rule is launched, to copy the file into an accounting folder, sorted by year/month/product based on my CSV bank statement.
These are nothing more and nothing less than commission statements by company.


Alors, le fichier se compose comme ça : date(aaaamm) label price.pdf donc uniquement le label reste le même.
Il est ensuite une première règle qui renomme et trie le fichier dans un dossier du même nom que le label.
Et, ensuite, la règle de trie se lance, pour copier dans un dossier comptable, trié par années/année mois/produit CE en fonction de mon relevé de banque en CSV.
Ce ne sont ni plus ni moins des relevés de commission par société.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

But are the files the same, content-wise, and why does it keep appearing?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:But are the files the same, content-wise, and why does it keep appearing?

Oui dans la forme le document est pareil. Sauf les valeurs à l'interrieur, hein ^^.

I don't know why it does that. In any case, it does that when I force the execution of the rule.
Maybe it's because I'm copying the file upstream of the folder and renaming it to move it into the subfolder.
As the upstream folder is empty, it's only when the file is moved into the subfolder that it sees that it's a duplicate and so throws it in the garbage can.
The idea would be to know if the file exists in the subfolder before sorting it, but I don't see how...

---

Je ne sais pas pourquoi ca fait ca. En tout cas, ca fait ca quand je force l'exécution de la règle.
Peut-etre lié au fait que je copie le fichier en amont du dossier et que je le renomme pour le déplacer dans les sous dossier.
Comme en amont le dossier est vide, ce n'est qu'au moment du sort into subfolder qu'il voit que c'est un double est donc le met à la poubelle.
L'idée serait de savoir si le fichier existe dans le sousdossier avant de le trier, mais je ne vois pas comment ...
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

If you can prevent the file from being created, that would be best as once the file is created, Hazel, in general, avoids deleting files outright unless they are in the trash already.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron