R
Rich Pasco
I've had some trouble spawning a program with the "start" command by
giving its full command path, when said command path includes a space.
For example, suppose I want to launch
C:\Program Files\TextPad 4\TextPad.exe
(TextPad is a popular text editor.)
If I invoke
start C:\Program Files\TextPad 4\TextPad.exe
then I get an error that "Windows cannot find 'C:\Program'..."
Obviously, something is needed to glue the tokens together.
However, if I invoke
start "C:\Program Files\TextPad 4\TextPad.exe"
then instead of Textpad, a command shell is launched with the
above string as its title!
The syntax help for START gives a clue:
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]
If the first token is quoted, it is assumed to be a window title.
So, to do what I want, it seems I must add a dummy, unused title:
start "Dummy" "C:\Program Files\TextPad 4\TextPad.exe"
Am I correct that "Dummy" or its equivalent is required whenever the
path name includes spaces and thus requires quotes?
- Rich
giving its full command path, when said command path includes a space.
For example, suppose I want to launch
C:\Program Files\TextPad 4\TextPad.exe
(TextPad is a popular text editor.)
If I invoke
start C:\Program Files\TextPad 4\TextPad.exe
then I get an error that "Windows cannot find 'C:\Program'..."
Obviously, something is needed to glue the tokens together.
However, if I invoke
start "C:\Program Files\TextPad 4\TextPad.exe"
then instead of Textpad, a command shell is launched with the
above string as its title!
The syntax help for START gives a clue:
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]
If the first token is quoted, it is assumed to be a window title.
So, to do what I want, it seems I must add a dummy, unused title:
start "Dummy" "C:\Program Files\TextPad 4\TextPad.exe"
Am I correct that "Dummy" or its equivalent is required whenever the
path name includes spaces and thus requires quotes?
- Rich