Page 1 of 1

Renaming file using part of existing file name?

PostPosted: Fri Sep 26, 2014 12:01 pm
by MacOCD
I download bank statements from various accounts with the same bank that have a similar naming convention.

eg:
12345678-999888777666-082014.pdf where the 999888777666 would be the account number.

Currently I'm using Hazel to rename the file
MyBank Savings Account 12345678-999888777666-082014.pdf
and move it into a folder for that account.

It works OK, but I'd prefer the statements to be named in Date order. I don't need to extract the date from within the PDF (which contains many dates) as the last 6 digits of the file name contain the month & year of the statement. I'd like to be able to use that information to rename the file

2014-08 MyBank Savings Account 12345678-999888777666-082014.pdf

Is it possible in Hazel to rename a file multiple parts of the existing filename?

Thanks for any help,

Mark.

Re: Renaming file using part of existing file name?

PostPosted: Mon Sep 29, 2014 3:03 pm
by Mr_Noodle
Yes, search the in-app help for "match patterns" which is what you want to use to accomplish this.

Re: Renaming file using part of existing file name?

PostPosted: Tue Sep 30, 2014 10:48 am
by MacOCD
Match Patters was exactly what I needed, it works brilliantly.

Thanks.