Explore specify folder via textpad

本文介绍如何在TextPad中创建一个工具,该工具能够使用Windows资源管理器打开当前活动文件所在的文件夹,并突出显示该文件。通过简单的配置步骤,用户可以方便地查看文件所在的目录。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Now and then, when editing a file, I want to have the folder that contains the file also visible in a window. This small tutorial explains how you can add a tool to TextPad that uses the Windows Explorer program to open the parent folder of the currently active file in TextPad.

Note: TextPad already comes with an Explorer (Alt+F3) option in the Tools menu. However, since this tool lets you specify options to be passed to the Windows Explorer program or a program with similar functionality, you might want to read this tutorial.

Creating the Explorer tool

In order to create a new tool for TextPad, open the Preferences dialog window. You can do this by either pressing Ctrl+Q followed by P or select the Preferences... entry in the Configure menu of TextPad.

Preferences dialog of TextPad.
Preferences dialog of TextPad.

Select the Tools entry in the left part of the dialog window. Now the center part shows a list of Tools already defined, with an Add button to the right. Click the Add button, and select the "Program..." entry.

Select the explorer program in the Windows folder.
Select the explorer program in the Windows folder.

The "Select a File" dialog window is opened. The Explorer program is normally installed in the Windows folder of drive C, so first click on the "My Computer" icon in the left panel of the dialog window, open de Local Disk (C:), and then the Windows folder.

Select the explorer file, or if you have extensions visible (good idea), the explorer.exe file, and click on the Open button. You should now see an "Explorer" entry added to the tools in the Preferences dialog window of TextPad.

Configuring the Explorer tool

After the Explorer tool has been created in TextPad, it needs to be configured. First, make sure you press the Apply button. This adds the Explorer tool to the Tools in the left pane of the Window but leaves the Preferences dialog window open.

Next, click on the plus sign in front of "Tools" in the left pane of the Preferences dialog window. The Explorer tool should appear under Tools. Select the Explorer entry.

Parameters of the Explorer tool.
Parameters of the Explorer tool.

Finally, insert in front of the $File parameter in the Parameters field the following:

/select,

so the entire entry of the Parameters field reads:

/select,$File

and click on the OK button. The /select parameter opens the parent folder of the file, and selects the file itself, which might come in handy in many cases.

The Explorer tool now has been added to the Tools menu of TextPad, and has the shortcut key Ctrl+1 assigned to it. See the end of the Using Subversion via TextPad article on how to change the shortcut key and some other useful tips.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值