Date matching in file name

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

Moderator: Mr_Noodle

Date matching in file name Sat Jan 09, 2016 1:53 am • by Philippe
Sorry to ask a silly question but I just can't get Hazel to recognise date patterns in file names like these:

Oct 2015ST.pdf
Nov 2015ST.pdf
Dec 2015ST.pdf
Jan 2016ST.pdf

The pattern is <mmm><space><yyyy>ST

I want the names changed to <yyyy>-<mm> <myname.pdf>

I have tried a condition: <Name> <matches> <custom date>. The <cusotm date> is in the format <Dec><space><2015>ST

I have tried variations on that theme—none of which work.

What am I doing wrong?

Thank you in anticipation.
Philippe
 
Posts: 2
Joined: Sat Jan 09, 2016 1:40 am

Re: Date matching in file name Mon Jan 11, 2016 11:26 am • by Mr_Noodle
Do they match in the preview? If so, then the problem may be in your actions and not in the conditions.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Date matching in file name Mon Jan 11, 2016 10:44 pm • by Philippe
No—they do not match the preview. And that's what's driving me crazy.

But the problem must have been with me, as I tested the elements one by one to see what would display in the preview and miraculously it all works now provided I set the pattern without the extension.

I now figure that the condition <Name> is different to <Full Name> but I didn't think to open that parameter and wrongly assumed that "name" was "name and/or extension."

Thank you Mr Noodle: you have the magic touch.
Philippe
 
Posts: 2
Joined: Sat Jan 09, 2016 1:40 am


Return to Support