Page 1 of 1

rule sorting files depends on date in filename

PostPosted: Sun Nov 06, 2016 8:23 am
by HaubenTaucher
Good morning...

need some help please....

i have a PDF-file named: Noodlesoft-Hazel-20161105_testfile.pdf

what i need:
a rule based on the filename where Hazel should use the date in the filename here and then move the file into a folder with the correct year (2016).
But the date is not exactly at the same position in the filename. The position of the date in the Filename is variable....

I would appreciate any suggestions.
Thanks for your feedback in advance.

Re: rule sorting files depends on date in filename

PostPosted: Mon Nov 07, 2016 12:10 pm
by Mr_Noodle
Variable in what way? Is there predictable text before or after? Can you give some examples?

Re: rule sorting files depends on date in filename

PostPosted: Mon Nov 07, 2016 1:30 pm
by HaubenTaucher
Hej,
thanks for answering...

in that way:
test_20160511-nochwas.pdf
RE_20160512_woauchimmer.pdf
hiernoch_20160513_was.pdf
20160514_wasistnochsuchbar.pdf
Beleg_20160515_WeitWinkel.pdf

HTH?
Best regards
Rolf

Re: rule sorting files depends on date in filename

PostPosted: Tue Nov 08, 2016 11:58 am
by Mr_Noodle
If you haven't already, search the help for "match patterns". You should be able to specify a pattern to match the date. You can use the "anything" token to match the text before and after.