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.
PFA question
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: PFA question
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";
"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
This seems to work:
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.
Code: Select all
*history*.txt;*history*.nfo>C:\Program Files\Windows NT\Accessories\wordpad.exe-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
XYplorer Beta Club