Launching files via PFA exclusive to folders

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
vrtarifaachen
Posts: 124
Joined: 02 Jul 2009 14:28

Launching files via PFA exclusive to folders

Post 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.

highend
Posts: 14953
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Launching files via PFA exclusive to folders

Post 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...
One of my scripts helped you out? Please donate via Paypal

vrtarifaachen
Posts: 124
Joined: 02 Jul 2009 14:28

Re: Launching files via PFA exclusive to folders

Post 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.

highend
Posts: 14953
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Launching files via PFA exclusive to folders

Post 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"
One of my scripts helped you out? Please donate via Paypal

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Launching files via PFA exclusive to folders

Post 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"

vrtarifaachen
Posts: 124
Joined: 02 Jul 2009 14:28

Re: Launching files via PFA exclusive to folders

Post by vrtarifaachen »

Thank you guys! :appl: This worked perfectly :biggrin:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Launching files via PFA exclusive to folders

Post 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.

Post Reply