Always open PDFs from one path with a non-default program

applescriptautomatorpdf

My default PDF App is Preview. Now, I have one folder (with sub-folders in it) with PDFs that I would like to have to open all the time with another program. So basically I need to put a "Default program" for a restricted path.
Unfortunately the "Always open…" is not an option (even if it would work), because the documents in this folder change pretty often.

Does someone know if Automator or AppleScript may help me with this?

Best Answer

Using Finder for file management?

Drag your program of choice into the toolbar and drop it there:

Add a file or an app: Press and hold the Command key, then drag the item to the Finder toolbar until you see a green plus sign.

Now double click on a PDF will open the PDF still in Preview.

You can select your other PDFs and then drop them on the Toolbar icon for the program of your choice.


Using a more programmery way would be to make an alias to

open -a YourAlternativePDFViwer.app 

Then you type in Terminal your alias, drag&drop all your special PDFs on the Terminal. Terminal then expands all the paths to your PDFs and upon hitting Enter your preferred viewer should open all those PDFs.

Even easier would be an alias that reads as follows:

open -a YourAlternativePDFViwer.app /path/to/your/SpecialtyPDFS/*.pdf

If more automation is required, then you might have a look into Folder Actions Reference.

For double-clicking AFAIK it's either one or the other. But depending on special filetype characteristics RCDefaultApp might be worth a look.