Update: 2 extended aliases!
Alias to add a farr "context menu" to a file in the farr search field
Alias to add a farr "context menu" to any string in the farr search field not containing a file extension
Each context menu is shown when you append a <space> and a dot and an optional menu match string.
example
farr search field | c:\user\wim\my documents\test.txt . | shows the complete list of menu lines matching extension txt to handle the file test.txt |
example:
farr search field | c:\user\wim\my documents\test.txt .note | shows a list of menu lines matching string 'note' to handle the file test.txt |
description | alias for file names with extension like .doc, .txt, .ahk |
usage | full path and file name including extension<space>.<result menu filter> |
please note | full path and file name may contain spaces and dots, easiest to copy result from farr search results (or directory traversing) by pressing Cursor-Right-key |
alias | file extension menu |
regex | ^((.+)\\(.+)\.(\S+))\s+\.(.*)$ |
filter | $$5 $$4 |
usage within result(s) | value |
$$1 | <path>\<file name>.<file extension> |
$$2 | <path excluding backslash at end> |
$$3 | <file name excluding path and excluding extension> |
$$4 | <file extension excluding preceding dot> |
$$5 | <result menu filter> |
usage | description | farr result entry (copy only this part) |
file_name . | start default windows assocation | [Enter] run default prog for -file.$$4 | shellexe $$1 |
file_name .vlc | open mkv avi and mp4 files with vlc | [Enter] VLC (mkv;avi;mp4) | %programfiles%\vlc\vlc.exe "$$1" |
file_name .view | open file with any extension in irfanview (image viewer) | [Enter] / IRFANview -file.$$4 | %programfiles%\irfanview\i_view32.exe "$$1" |
file_name .npp | open any file in notepad must include $$4 to match any file extension | [Enter] notepad npp -file.$$4 | c:\windows\notepad.exe "$$1" |
file_name .chro | open file in chrome browser use $$4 to match all file extensions | [Enter] chrome -file.$$4 | %myAppData%\Google\Chrome\googlechrome.exe "$$1" |
file_name .cl | copy file name to clipboard | [Enter] FARR copy $$1 to CLIPBOARD | copyclip $$1 |
file_name .string | show lines within txt files (current folder and down) containing string using findstr in msdos box | [Enter] find string '$$5' in *.txt /s | %systemdir%\cmd.exe /k findstr /S /I /P $$2 "$$2*.txt" |
file_name.py .string | show lines within files with same extension e.g. .py (current folder and down) containing string using findstr in msdos box | [Enter] find string '$$5' in *.$$3 /s | %systemdir%\cmd.exe /k findstr /S /I /P "$$5" "$$2*.$$3" |
file_name.doc . | make subfolder file_name and move file_name.doc to subfolder, select this option from the result list | [Enter] mv $$4-file to subFolder $$3 | %systemdir%\cmd.exe /c mkdir "$$2\$$3";;; %systemdir%\cmd.exe /c move /-Y "$$2\$$3.$$4" "$$2\$$3" |
tip:
To always show a certain menu line when adding a dot in the search field, you should use the file extension ($$4) before the '|'.
tip:
The descriptive part before the '|' shouldn't be too long, otherwise the menu line gets cut up weirdly in the farr search results. Therefore use file_extension ($$4) instead of the full pathname ($$1)
A similar alias menu for strings / folders without extensions. This requires a different alias and regex. If you want to use both aliases the one matching no extensions should appear
after the one matching extensions.
description | for file names without extension |
usage | any string <space>.<result menu filter without spaces> |
please note | full path and file name may contain spaces and dots |
please note | easiest to copy result from search results using cursor right key |
alias | any string context menu |
regex | ^(.+)\s+\.(.*) |
filter | $$2 |
Some examples of FARR alias result entries
usage | description | farr result entry |
string or url . | copy $$1 to clipboard | [Enter] FARR copy $$1 to CLIPBOARD | copyclip $$1 |
folder . | show lines within files with same extension (current folder and down) containing string using findstr in msdos box | [Enter] find string '$$2' in $$1*.* /s | %systemdir%\cmd.exe /k findstr /S /I /P "$$2" "$$1*.*" |
string . | look up string using duckduckgo.com | [Enter] duckduckgo.com '$$1' |https://www.duckduckgo.com/?q=$$1 |
word . | look up word using wikipedia | [Enter] lookup $$1 in WIKIPEDIA| https://en.wikipedia.../w/index.php?search=$$1&title=Special%3ASearch&go=Go |
For wikipedia, copy text below, php table formatting removed some essential details of the wikipedia url.
[Enter] lookup $$1 in WIKIPEDIA|
https://en.wikipedia.../w/index.php?search=$$1&title=Special%3ASearch&go=Go
tip:
Sometimes pressing the cursor-right-key seems the correct action to execute the command from the new farr context menu, but this will give a strange result (the name of the alias will be copied to the search field). Therefore I placed [Enter] at the beginning of each farr alias result entry to make sure you press the [Enter] key. You can also double click the line and of course use the short cuts F1-F9 for the first nine entries.
tip:
If you edit the registry entries in my other post : how to start FARR from within explorer or total commander(TC). You can include a <space> and a <dot> at the end of the registry entry. When you then start FARR from within TC the above farr context menu will automatically appear. See underlined characters in registry :
[HKEY_CLASSES_ROOT\*\shell\FARR file\command] | @="\"c:\\filemngr\\farr portable\\FindAndRunRobot.exe\" -search \"%1 .\"" |
Enjoy!