Textpad in command prompt
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 5
- Joined: Mon May 03, 2010 8:23 pm
Textpad in command prompt
I know I have seen how to set this up somewhere but I can't seem to find it.
Could someone tell me how to setup environment variables in Windows to allow me to use Textpad in command prompt to open files?
Thanks in advance
Could someone tell me how to setup environment variables in Windows to allow me to use Textpad in command prompt to open files?
Thanks in advance
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Don't know what environment variables are needed, but if TextPad is installed properly, you can run TextPad from the command line in a Command prompt window. You may need to use the complete path if TextPad folder is not in your path variable.
Search TextPad HELP, search for "Command Line" for the details about the available switches that can be used.
Search TextPad HELP, search for "Command Line" for the details about the available switches that can be used.
Hope this was helpful.............good luck,
Bob
Bob
-
- Posts: 5
- Joined: Mon May 03, 2010 8:23 pm
Okay. Thanks.
What I am trying to do is enable the setting that when I am in command prompt, instead of typing 'notepad sample.txt' and it opens sample.txt with Notepad or 'write sample.txt' and it opens sample.txt with Wordpad, I want to be able to type 'textpad sample.txt' and it opens it in Textpad.
I had somehow found this environment variable on the internet somewhere (I thought it was on the Textpad website but can't find it now) when my machine was running Windows XP. I have since rebuilt with Windows 7 and completely forgot to take note of that environment variable to enable it in Windows 7 now.
I guess I will need to do some more searching.
What I am trying to do is enable the setting that when I am in command prompt, instead of typing 'notepad sample.txt' and it opens sample.txt with Notepad or 'write sample.txt' and it opens sample.txt with Wordpad, I want to be able to type 'textpad sample.txt' and it opens it in Textpad.
I had somehow found this environment variable on the internet somewhere (I thought it was on the Textpad website but can't find it now) when my machine was running Windows XP. I have since rebuilt with Windows 7 and completely forgot to take note of that environment variable to enable it in Windows 7 now.
I guess I will need to do some more searching.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
The installer should have created a registry entry for it.
If it hasn't, you can add TextPad's program directory to your path. On the command line:
(Adjust this to match where TextPad is installed.)
You can set environment variables permanently, but I don't know how to do that in Windows 7.
If it hasn't, you can add TextPad's program directory to your path. On the command line:
Code: Select all
set path=C:\Program Files\TextPad 5;%path%
You can set environment variables permanently, but I don't know how to do that in Windows 7.
-
- Posts: 5
- Joined: Mon May 03, 2010 8:23 pm
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Windows 7 makes it easier as it has PowerShell installed by default.ben_josephs wrote:You can set environment variables permanently, but I don't know how to do that in Windows 7.
Start -> Run powershell
Code: Select all
$Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";C:\Program Files\TextPad 5;"
[Environment]::SetEnvironmentVariable("Path", $Path, "Machine")
Exit
I choose to fight with a sack of angry cats.
-
- Posts: 5
- Joined: Mon May 03, 2010 8:23 pm
-
- Posts: 5
- Joined: Mon May 03, 2010 8:23 pm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 8
- Joined: Thu Jun 03, 2010 12:21 pm
- Location: A2, Mi, US
I don't like to type much, so i have a tp.bat file on my path. The file contains one line:
start "TextPad" "C:\Program Files\TextPad 5\TextPad.exe" %*
so i can type:
tp <some files>
On another machine i AutoRun a profile.bat which contains doskey macros (like unix aliases). One of those is
doskey tp="c:\Program Files\TextPad 4\TextPad.exe" $*
so again i can type:
tp <some files>
I also have a desktop shortcut to TextPad, with a shortcut key defined, so i can hit cntrl-alt-t at anytime to start TextPad.
I havn't done anything with Win7 yet, but i expect these things to work there.
start "TextPad" "C:\Program Files\TextPad 5\TextPad.exe" %*
so i can type:
tp <some files>
On another machine i AutoRun a profile.bat which contains doskey macros (like unix aliases). One of those is
doskey tp="c:\Program Files\TextPad 4\TextPad.exe" $*
so again i can type:
tp <some files>
I also have a desktop shortcut to TextPad, with a shortcut key defined, so i can hit cntrl-alt-t at anytime to start TextPad.
I havn't done anything with Win7 yet, but i expect these things to work there.
I had somehow found this environment variable on the internet somewhere (I thought it was on the Textpad website but can't find it now) when my machine was running Windows XP. I have since rebuilt with Windows 7 and completely forgot to take note of that environment variable to enable it in Windows 7 now.
I guess I will need to do some more searching.
I guess I will need to do some more searching.
-
- Posts: 1
- Joined: Sat Jun 05, 2010 8:51 am
-
- Posts: 2
- Joined: Mon Aug 02, 2010 10:29 am