文件查找工具Everything的上下文菜單配置

Everything是一個Windows上的文件搜索引擎,支持按文件名和目錄名搜索文件和目錄。app

我使用的Everything版本爲:Version 1.3.4.686 (x86)函數

在搜索結果中單擊鼠標右鍵,會彈出上下文菜單(Context Menu),本文主要總結了這些按鈕的可見性和觸發事件的配置。this

上下文菜單中,最上面的幾個按鈕能夠經過下面的方法配置:搜索引擎

一、在Tools菜單下面找到Options
code

二、找到General下的ContextMenu,就能夠看到上下文菜單的配置界面了
索引

配置界面中,最多能夠配置7個菜單項,除前兩個菜單項(打開目錄、打開文件)必定展現外,其餘的菜單項均可以配置下面屬性:事件

一、是否顯示在菜單中ip

Show this item:顯示在上下文菜單中ci

Show this item when the Shift key is down:在按Shift鍵同時右鍵打開的上下文菜單中顯示資源

Do not show this item:不顯示在上下文菜單中

二、單擊該菜單項時觸發的事件

Command後面的文本輸入框中,支持以下函數和轉義字符:

函數1:$exec(application parameters),執行應用程序,能夠帶參

函數2:$parent(filename),返回指定文件或目錄的父目錄

函數3:$pathpart(filename),返回指定文件或目錄的父目錄

函數4:$namepart(filename),返回指定文件或目錄的名稱

還有4個轉義字符

轉義字符1:%1,當前選中文件的文件名

轉義字符2:$$,同$

轉義字符3:$(,同(

轉義字符4:$),同)


下面逐個介紹下各個菜單項及命令

一、Open Folders(打開目錄)

這一菜單項必定會菜單中,點擊後執行命令:$exec("%1")

二、Open Files(打開文件)

這一菜單項必定會菜單中,點擊後執行命令:$exec("%1")

三、Open Path(打開路徑)

點擊後執行命令爲:$exec("%SystemRoot%\explorer.exe" /select,"%1")

四、Explore

點擊後執行命令爲:$exec("%SystemRoot%\explorer.exe" /n,/e,"%1")

五、Explore Path

點擊後執行命令爲:$exec("%SystemRoot%\explorer.exe" /n,/e,/select,"%1")

六、Copy Path to Chipboard

複製當前選中文件所在目錄的路徑到剪貼板,如:E:\war3\war3\10101071

七、Copy Full Name to Chipboard:

複製當前選中文件的完整路徑到剪貼板,如:E:\war3\war3\10101071\Warcraft III.exe

其中,菜單項1-5執行的命令是能夠手工設置的,其中涉及到用資源管理器打開目錄的功能,都使用到了explorer.exe,explorer.exe的參數能夠從下面的頁面查看到:

https://support.microsoft.com/en-us/kb/152457

涉及Explorer.exe參數的介紹文字以下:

Explorer [/n] [/e] [(,)/root,<object>] [/select,<object>]

/n                Opens a new single-pane window for the default
                  selection. This is usually the root of the drive Windows
                   is installed on. If the window is already open, a
                  duplicate opens.

/e                Opens Windows Explorer in its default view.

/root,<object>    Opens a window view of the specified object.


/select,<object>  Opens a window view with the specified folder, file or
                  application selected.

Examples:

   Example 1:     Explorer /select,C:\TestDir\TestApp.exe

      Opens a window view with TestApp selected.

   Example 2:  Explorer /e,/root,C:\TestDir\TestApp.exe

      This opens Explorer with C: expanded and TestApp selected.

   Example 3:  Explorer /root,\\TestSvr\TestShare

      Opens a window view of the specified share.

   Example 4:  Explorer /root,\\TestSvr\TestShare,select,TestApp.exe

      Opens a window view of the specified share with TestApp selected.
END
相關文章
相關標籤/搜索