Help renaming files based on content

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

Moderator: Mr_Noodle

Help renaming files based on content Fri Apr 27, 2012 7:00 pm • by Jeary
First off hazel is absolutely brilliant. I have been looking for a program to do what this can do, but nothing comes close to automating what I need. Hazel seems to have the potential to do it; I just need some direction.

I work for a company that has thousands of E-tickets coming in daily, weekly, etc..

These tickets come in bafhakfbaifh.pdf and we have to manually rename them or print them all out and then sort through them and put them in order.

What I would like to do is:

1. Split any pdf's that have more than one page or "ticket" in my case. I know how to do this with automator easily, but I'd love to keep it all in one program.
2. Search the file for Event Name (i.e. Madonna)
3. Search the file for Date of event (August 12, 2012)
4. Search the file for Section, Row, Seat (124 3 12)
5. Rename the file based on content found (Madonna August 12 2012 124 3 12.pdf)
6. Move From Folder X to Folder Y
7. Automatically print in alphabetical or some sort of designated order.

I have played with Hazel a bit and I can get it to successfully search the file for "James" in a James Taylor ticket, then rename it what I want and move it to the folder I want. Assuming I have hundreds of tickets for the same event, I want to be able to rename it in a more organized manner automatically.

I'm assuming I am going to have to get applescript involved, but I am no expert outside of editing someone else's code and doing that until it works.

Any help is much appreciated and if this works, my company will be buying Hazel and using on dozens of computers.

Thank you.
Jeary
 
Posts: 2
Joined: Fri Apr 27, 2012 6:47 pm

Re: Help renaming files based on content Mon Apr 30, 2012 9:57 am • by Mr_Noodle
You need to check the file's metadata to see where this stuff is stored. I'm not sure what program is generating these tickets but if you can get it to stick that info in a structured way into the file's metadata, then Hazel should be able to extract it. If it's just a general text search via Spotlight, I don't think you can do it in a generalized way. If you provide more details on this, I might be able to better assist.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Help renaming files based on content Tue May 01, 2012 11:17 am • by Jeary
I tried finding the file's metadata via Acrobat and only found blanks.

I'm starting to think its not possible to do what I was hoping. The best I can do it get a pdf miner type program, but then it seems impossible to rename it automatically based on what the miner found.
Jeary
 
Posts: 2
Joined: Fri Apr 27, 2012 6:47 pm


Return to Support