Perl programmer for hire: download my resume (PDF).
John Bokma TextPad
freelance Perl programmer

Explorer tool

Opens the parent folder | 0 comments

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.

Related

Please post a comment | read 0 comments | RSS feed