Page 1 of 1

Launching files via PFA exclusive to folders

Posted: 28 Dec 2013 01:28
by vrtarifaachen
Hi all,
This is what I want to do ...
I use PFA (portable file associations) in Xyplorer to lauch my images.

If the file is in C:\Pictures >> I want to use Irfanview (Located in D:\Apps\Irfanview\irfanview.exe)
If the file is in D:\Pictures >> I want to use Xnview(Located in D:\Apps\Xnview\xnview.exe)


Is this possible? I could've sworn there is a way to do this, but I can't remember.

Re: Launching files via PFA exclusive to folders

Posted: 28 Dec 2013 02:11
by highend

Code: Select all

C:\Pictures\*>"D:\Apps\Irfanview\irfanview.exe"
D:\Pictures\*>"D:\Apps\Xnview\xnview.exe"
And please, just read the helpfile next time... Advanced Topics - Portable File Associations - The Patterns...

Re: Launching files via PFA exclusive to folders

Posted: 28 Dec 2013 02:23
by vrtarifaachen
Hi highend,.
Thanks for the response.

Is there any way to specific what file types to include in your post? For example, I don't want all files launched on D:\ drive -- only pics.

That's where I have been having the problems.

Re: Launching files via PFA exclusive to folders

Posted: 28 Dec 2013 02:53
by highend
... it's all in the help file^^ (exactly at the point that I mentioned)...

Code: Select all

C:\Pictures\*.png;jpg;bmp>"D:\Apps\Irfanview\irfanview.exe"

Re: Launching files via PFA exclusive to folders

Posted: 28 Dec 2013 04:01
by Enternal
Oh Oh Oh Oh! I found a use for one of the scripting commands!

Just copy and paste this into the addressbar:

Code: Select all

RTFM("idh_fileassociations.htm");
But yes, basically what highend said:

Code: Select all

C:\Pictures\*.png;jpg;jpeg;bmp;gif>"D:\Apps\Irfanview\irfanview.exe"
D:\Pictures\*.png;jpg;jpeg;bmp;gif>"D:\Apps\Xnview\xnview.exe"

Re: Launching files via PFA exclusive to folders

Posted: 29 Dec 2013 05:01
by vrtarifaachen
Thank you guys! :appl: This worked perfectly :biggrin:

Re: Launching files via PFA exclusive to folders

Posted: 07 Jan 2014 16:35
by TheQwerty
I think there's some confusion in this thread - or maybe my mind is still on vacation. :whistle:

When the PFA contains multiple patterns each one is evaluated separate of the others.

Given:

Code: Select all

C:\Pictures\*.png;jpg;jpeg;bmp;gif>"D:\Apps\Irfanview\irfanview.exe"
D:\Pictures\*.png;jpg;jpeg;bmp;gif>"D:\Apps\Xnview\xnview.exe"
This actually means that:
irfanview will be used for pngs within C:\Pictures\ and its descendants and all jpg, jpeg, bmp, or gif files regardless of their location.
xnview will only be used for pngs within D:\Pictures\ and its descendants.

I believe what stisev actually wants would be this:

Code: Select all

C:\Pictures\*.png;C:\Pictures\*.jpg;C:\Pictures\*.jpeg;C:\Pictures\*.bmp;C:\Pictures\*.gif>"D:\Apps\Irfanview\irfanview.exe"
D:\Pictures\*.png;D:\Pictures\*.jpg;D:\Pictures\*.jpeg;D:\Pictures\*.bmp;D:\Pictures\*.gif>"D:\Apps\Xnview\xnview.exe"
Given enough extensions and you may want to consider a generic PFA for all images that calls a script which does the path evaluating and opening with the desired programs.