Have documents moved based on content within different file

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

Moderator: Mr_Noodle

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?
HowlinP
 
Posts: 4
Joined: Wed Feb 01, 2017 9:40 am

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.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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?
HowlinP
 
Posts: 4
Joined: Wed Feb 01, 2017 9:40 am

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.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support