PFA question

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

PFA question

Post by tiago »

Is there a way to open a file if a certain word is found on its name, and the file extension is a predefined one, or even a group of extensions?

Example: open with WORDPAD instead of notepad IF 'history' is found on file name and its extension is .txt or .nfo.
Power-hungry user!!!

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: PFA question

Post by serendipity »

If you have other PFA for text files, then put this code higher up in the PFA list:
"Textfile" history.*>::run "wordpad";

If you want only history.txt and history.nfo then use:
"Textfile" history.txt;history.nfo>::run "wordpad";

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: PFA question

Post by nas8e9 »

This seems to work:

Code: Select all

*history*.txt;*history*.nfo>C:\Program Files\Windows NT\Accessories\wordpad.exe
It finds files with "history" anywhere in the file name. Do note that in quick testing I needed to provide a path to the executable; the above path may need editing.

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: PFA question

Post by tiago »

Thank you, folks.
Power-hungry user!!!

Post Reply