Use textpad as a command liner
Posted: Thu Nov 02, 2006 1:43 pm
Textpad could be configured with Tools – e.g. Textpad could call externals programs, to which even a Textpad parameters (currently selected text, current opened file, current directory).The idea is to configure the cmd.exe – the Windows XP‘s command interpreter and pass to it any Textpad specific parameters or any cmd commands.
The following actions have to be performed in order to get this functionality:
- Display Preferences dialog box ( Alt + C , P)
- Select Tools , Add DOS Program
- type the full path to the cmd.exe (C:\WINNT\cmd.exe ) on Windows XP Profeccional (C:\Windows\cmd.exe ) on Windows XP Home
- Initial folder “$FileDir” the currently opened file’s directory
- Check “Prompt for parameters”
- Check “Save all documents first”
- Check “Capture output”
A simply shortcut could be assigned to this tool (herewith Ctrl + 4 used). So after pressing Ctrl + 4 , a text field for providing the parameters to the cmd.exe appears. Now by typing any command (for example dir /s /b ) textpad will provide the output of the command in the Command Results window, which could be saved instantly to a text file.
Textpad has the powerful feature to search for files (recursively) containing text or even regular expressions from the “Find in Files” or Ctrl + F5, yet sometimes one remembers only part of the filename and would not wait for the long lasting full directory searching by Textpad and would rather browse the names of the files (recursively) and open the result by simply opening it. This could be achieved by configuring textpad to run dos commands (see above)and simply Ctrl + 4 , type:
where /R \\my_network\file_folderToStartSearchFrom\ *stringToSearch*
This would require the Microsoft’s where.exe command line utility.
Other usefull commands might be the help for all dos / *nix gnu commands
for example
Tools - command
set /?
Not not mention ...
With shortcuts (Set first the shortcut )
Ctrl + 4 (or whatever you have set )
type :
perldoc perlfunc
needs perl ; )
The following actions have to be performed in order to get this functionality:
- Display Preferences dialog box ( Alt + C , P)
- Select Tools , Add DOS Program
- type the full path to the cmd.exe (C:\WINNT\cmd.exe ) on Windows XP Profeccional (C:\Windows\cmd.exe ) on Windows XP Home
- Initial folder “$FileDir” the currently opened file’s directory
- Check “Prompt for parameters”
- Check “Save all documents first”
- Check “Capture output”
A simply shortcut could be assigned to this tool (herewith Ctrl + 4 used). So after pressing Ctrl + 4 , a text field for providing the parameters to the cmd.exe appears. Now by typing any command (for example dir /s /b ) textpad will provide the output of the command in the Command Results window, which could be saved instantly to a text file.
Textpad has the powerful feature to search for files (recursively) containing text or even regular expressions from the “Find in Files” or Ctrl + F5, yet sometimes one remembers only part of the filename and would not wait for the long lasting full directory searching by Textpad and would rather browse the names of the files (recursively) and open the result by simply opening it. This could be achieved by configuring textpad to run dos commands (see above)and simply Ctrl + 4 , type:
where /R \\my_network\file_folderToStartSearchFrom\ *stringToSearch*
This would require the Microsoft’s where.exe command line utility.
Other usefull commands might be the help for all dos / *nix gnu commands
for example
Tools - command
set /?
Not not mention ...
With shortcuts (Set first the shortcut )
Ctrl + 4 (or whatever you have set )
type :
perldoc perlfunc
needs perl ; )