Page 1 of 1
PFA question
Posted: 13 Oct 2012 00:01
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.
Re: PFA question
Posted: 13 Oct 2012 00:14
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";
Re: PFA question
Posted: 13 Oct 2012 00:17
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.
Re: PFA question
Posted: 13 Oct 2012 00:23
by tiago
Thank you, folks.