Way to make target folder programmable ?

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

Moderator: Mr_Noodle

Way to make target folder programmable ? Sun Apr 25, 2010 10:08 am • by fmenard123
At our office, we are ISO-9001 certified.

We have a practice of naming our filing directories with a folder number that is globally unique.

Let's say that string is 82998-XXXX where XXXX is a number between 1 and 9999 which corresponds to the file number.

However, the name of that folder is not necessarily well known, but it WILL contain the same that 82998-XXXX string somewhere in it.

As an example, a service offer we would make to Noodlesoft, our folder would be named:

82998-1234-Noodlesoft-Offer-for-services

Into these folders, we have well known subfolders, which are always named the same for each filing folder.

i.e. Emails, ISO, Purchase Orders, etc.

What I would like to do is to build a rule where the target folder is a pattern that is programmable.

So the work flow would be.

In my downloads folder, rename file from xyz.doc to 82998-1234-xyz-PurchaseOrder.doc and

Hazel would move that file into

82998-1234-Noodlesoft-Offer-for-services\PurchaseOrders\

Is this possible ?

Regards,

-=Francois=-
fmenard123
 
Posts: 1
Joined: Sun Apr 25, 2010 9:54 am

Mmm..

There's 'kMDItemWhereFroms'. Presumably, the URL it contains would have the string "noodlesoft". So It is possible to get the origin of the downloaded file.

As to what it actually is ('purchase order') I don't see any way to figure that out, except by human intervention. You wouldn't want to impose a file naming convention upon the client...
But you could make a 'drop box' to pre-sort files: a folder named "Purchase orders". Attach a rule to figure out whose purchase order it is, and Hazel will file it. That still needs human intervention, though.
And Hazel doesn't read that attribute herself, it would have to be a script.

Maybe a bit too much when you need more than, say, three pre-sort folders.
alastor933
 
Posts: 53
Joined: Wed Mar 05, 2008 3:52 pm
Location: Utrecht, Netherlands

Check the in-app help for "match patterns" and "custom tokens". This feature allows you to match a pattern to pick out parts of the filename which you can then use in your rename/sort patterns.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support