Parse file name and match with folder?

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

Moderator: Mr_Noodle

Parse file name and match with folder? Tue Dec 06, 2016 3:18 am • by miyixinsun
I regularly download images from DeviantArt and would like Hazel to sort them for me automatically.

For example,

forest_owl_by_secretdartiste-daka9cz.png

The formula for DeviantArt's images is always:
filename_by_USERNAME-extrastuff

That is, the USERNAME is always preceded by a by_ and ends after -

I would like Hazel to identify the username based on the file name, traverse my directory for the matching folder, and move it there. If there is no matching folder, then have Hazel create a new one.

I realize this might be a bit complicated but I've heard good things about Hazel.

Thank you in advance.
miyixinsun
 
Posts: 2
Joined: Tue Dec 06, 2016 3:06 am

Re: Parse file name and match with folder? Tue Dec 06, 2016 12:24 pm • by Mr_Noodle
Search for "match patterns" in the help. The sort into subfolder action should handle the actual sorting part.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Parse file name and match with folder? Tue Dec 06, 2016 1:37 pm • by miyixinsun
Mr_Noodle wrote:Search for "match patterns" in the help. The sort into subfolder action should handle the actual sorting part.


Hi Mr Noodle, I just tried it and it worked like a charm. Thank you so much!
miyixinsun
 
Posts: 2
Joined: Tue Dec 06, 2016 3:06 am


Return to Support