Delete part of filename while rename

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

Moderator: Mr_Noodle

Delete part of filename while rename Sun Mar 24, 2019 3:20 pm • by Deus
Hello,

a friend recommended Hazel to me for paperless office. Today I spend many hours for trying to work with hazel. Bevor starting I read the User's Manual.

For the following problem I didn't found any help in User's Manuel, not in the forum and even not in the internet. Now I hope you can help me.

My scanner saves new documents in following format "Scannen 2019-3-24 10.26.36" it's like "Scannen YYYY-M (MM) -DD hh.mm.ss".
Now I want Hazel to read the companies name out of the document with a Contain condition an replace the hole document's name with the companies name. For example: the document is from companie British Airways. So Hazel should change name from "Scannen 2019-3-24 10.26.36" to olny "British Airways".

The Rename option "name" with function "replace" is working just by the word "Scannen" but not with the Date and Time because they ever change.

I didn't found any other fitting option, even I was not able to create a fitting custom pattern and so I wasn't able to solve my problem by myself.

Now after many hours I'm desperate and hope you can help.

Thank's a lot

Greetings
Deus
 
Posts: 2
Joined: Sun Mar 24, 2019 3:01 pm

Re: Delete part of filename while rename Mon Mar 25, 2019 11:03 am • by Mr_Noodle
Are you using match patterns? If not, then please re-read the appropriate chapter.

If you still can't get it working, then please post the pattern you are using.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Delete part of filename while rename Fri Mar 29, 2019 1:15 am • by Deus
Hello Mr_Noodle,

thanks for your answer.

Yes, I'd tried to use patterns like name und custom name pattern. But now by luck I've found the solution.
Out of the User's Manual I didn't understand that while using a match condition I'm be able to write down the favored new documents name by myself without using a pattern.

So now I've defined a rename condition with parameters like "custom date-pattern British Airwaysextension-pattern". And now it works fine.
Deus
 
Posts: 2
Joined: Sun Mar 24, 2019 3:01 pm


Return to Support