matching bank statement download file names

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

Moderator: Mr_Noodle

I can't work out why this won't match. When I use the 'eye' to preview my directory, and use info, the Name is highlighted red - so I assume there is a match there. But the debut info says 'Did not match any rules.

so the file name is Statement--601721-6314813--02-02-2008-03-02-2009.pdf

Image
Image
Image
Image
sportsnapper
 
Posts: 9
Joined: Wed Mar 05, 2014 4:52 am

If it is highlighted in red that means it failed to match. A positive match would be highlighted in blue.

I recreated your conditions and it worked for me. Perhaps you have a space in a rule somewhere that you are not seeing.
Try importing my rule and see if it works for you.

Image
Smudge
 
Posts: 34
Joined: Mon Jul 15, 2013 10:44 pm

Thanks for your help - yes, yours works fine.

I've not really been able to see why my pattern didn't match, but I have built up a new rule from scratch, and got that working. I've simplified the sort code and account number pattern matches in to just a string of numbers, which is easier as account codes can be 7 or 8 digits.

Similarly, there is an issue with the date field, where it can be 2-02-2014-05-03-2014, or 12-02-2014-05-03-2014 I couldn't get the day filed to match with both types of date - so I just used an anything string to match the day field.

It works now. Really wish Hazel would tell me why the match failed.
sportsnapper
 
Posts: 9
Joined: Wed Mar 05, 2014 4:52 am

In your original pattern, I see a space after the double-dashes which is non-existent in the filename. I'm guessing that caused it to fail.
Mr_Noodle
Site Admin
 
Posts: 11262
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr. Noodle, it looks like a space, but when you move the cursor along the pattern, it's not a space - just looks like it in the dialog. My working pattern looks like it has a space there too...
sportsnapper
 
Posts: 9
Joined: Wed Mar 05, 2014 4:52 am

sportsnapper, although it is working for you now and you might not want to tweak it any further, I think the date problem you were having is because the month and day variables are swapped in your condition.

Being a bank statement, I'm assuming it is for 1 month and not 1 day? So the Statement--601721-6314813--02-02-2008-03-02-2009.pdf file would be for Feb 2, 2008 thru Mar 2, 2008, right? Well your NatWest date start value is set to day-month-year so it would parse the filename as Feb 2, 2008 thru Feb 3, 2008.

The default setting for the month and day tokens is to only match 2 digits, thus requiring a leading zero. If you want it to match on 1 or 2 digits, click the white down arrow on the month and day tokens and choose the first option that does not have the underlined numbers.



Mr_Noodle, obviously there is a problem with spacing in the field.
Here is an example without and with a space after the 2 hyphens.
Image

Are you able to adjust the spacing around the blue bubble? If you could remove the leading and trailing spaces around the blue bubble, it would be more obvious when there is a proper space character.

Another idea is to change the text field to use a fixed width font. It wouldn't remove the problem completely because of the space before the bubble but it would help.
Code: Select all
Statement--•Sort Code-•Account--◦StartDate-◦EndDate
Statement-- •Sort Code-•Account--◦StartDate-◦EndDate


Last idea is to display a different character instead of a space. This is a common option in many programming IDE applications.
Here is an example using the bullet operator and bottom square bracket characters.
Image
∙ BULLET OPERATOR; Unicode: U+2219, UTF-8: E2 88 99
⎵ BOTTOM SQUARE BRACKET; Unicode: U+23B5, UTF-8: E2 8E B5

and thus a feature request for you to consider, make all 3 changes :shock:
Image
Smudge
 
Posts: 34
Joined: Mon Jul 15, 2013 10:44 pm

I'm currently using an Apple widget for that so I don't control the spacing. At some point, I will switch to a homegrown one so we'll see what happens with that.
Mr_Noodle
Site Admin
 
Posts: 11262
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support