Personally, it comes down to the number and type of special cases you have.
For the scenario mentioned I'd use two PFAs:
Code: Select all
*\Downloads\*.pdf>sumatra.exe
pdf>acrobat.exe
One advantage to this approach is that in your Downloads folder the open with menu will show both entries allowing you to temporarily use acrobat if desired. Unfortunately, outside of that folder you'll only see the acrobat option unless you also add a third entry:
Code: Select all
*\Downloads\*.pdf>sumatra.exe
pdf>acrobat.exe
pdf>sumatra.exe
Another advantage is it means you don't have to give consideration to how your script works when called with multiple items - which can be a bit
confusing.
However, this does not scale well when there are more special cases. For instance if you wanted to apply this same behavior to epub files (ignoring that acrobat cannot handle them). Then you'd need:
Code: Select all
*\Downloads\*.pdf;*\Downloads\*.epub>sumatra.exe
pdf;epub>acrobat.exe
At present there's no good way to consolidate the patterns for sumatra - something similar to Color Filter's pre-filters or regex support would help greatly.
My suggestion is start with multiple PFAs and when the number, length, or complexity annoys you and you have the time convert to a script as highend suggested.
But please put that script in a file and load it from your PFA!
Present-me is a huge fan of one-liners but future-me always wants to kill past-me for the nightmares they leave behind!
