Page 1 of 1

Have documents moved based on content within different file

PostPosted: Wed Feb 01, 2017 9:57 am
by HowlinP
I want my eBooks sorted. I have a few thousand of these and no overview which to keep and which to delete. All of these are in the epub-format and are named "last name, first name_book title.epub".

For this I'm trying to get Hazel to look through a list within either a numbers file or a pages file (whatever works better) in which I keep names of authors which I don't like. Based on the content of this file I want to look for matches with the existing file names of the eBooks. If there's a match Hazel should move the file to the trash. This way, if I add to the collection by copying from a friends drive all uninteresting literature willl get deleted automatically.

Since there are just too many books I can't simply make a rule for each author because then I would have to create at least a few hundred rules...

Any ideas?

Re: Have documents moved based on content within different f

PostPosted: Wed Feb 01, 2017 12:05 pm
by Mr_Noodle
You'd probably need a script to read in this file and accept/reject accordingly. I would recommend against use Numbers or Pages since their file formats are proprietary and not easily readable. A plain text file is probably best.

Re: Have documents moved based on content within different f

PostPosted: Sat Feb 04, 2017 1:40 pm
by HowlinP
That's what I thought. I can easily use a plain text document but have no clue about apple script. Are there some ideas how to edit the script accordingly?

Re: Have documents moved based on content within different f

PostPosted: Mon Feb 06, 2017 4:07 pm
by Mr_Noodle
You can edit the file using TextEdit. As for the script itself, that's beyond the support I can give but maybe someone else here could help out.