START command prompt - fails for flnm with spaces

  • Thread starter Thread starter BryanC
  • Start date Start date
B

BryanC

Help please! - I can't get the START command to work for a
filename containing spaces.

I use a BAT file to open a bunch of Excel and Word docs in
turn depending upon what project I'm working on.
Works fine for files without spaces, but it fails with
spaces. eg, in a BAT file...

START /DC:\Data\Bryan\ BZD_Test1.xls
START /DC:\Data\Bryan\ BZD_Test1.doc
START /DC:\Data\Bryan\ "BZD_Test2 blah blah.xls"

Have tried all sorts of combinations of quotes for the
third case and have searched the net and MS with no sucess.

Any suggestions?

Cheers,
Bryan
PS The help for the START command is pathetic. It gives
no example of the usage for spaces in flnms. And most
windows users use lots of spaces.
 
Help tells you your answer.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]

Note the first and only compulsory quotes are around the window title. The first pair of quotes will become the Window title.

start "" "C:\Data\Bryan\ BZD_Test1.xls" will work. Don't use /d. That changes directory.
 
Thanks very much David.

Thanks also for the tip re "/d". I found the solution
(process below). You beat me to the posting I just logged
on to make...
(I will submit a suggestion to M$ to improve their
documentation. If I wasted time on something so important
then so will others.)

I found the solution via a very roundabout search process
and an implied solution!!
The solution is...
START "window title text" /DC:\Data\Bryan\ "BZD_Test2 blah
blah.xls"


Googled with:- windows start filename space* "command
prompt" -button -menu -click
Page1 Useless wrt spaces>
http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/winxppro/proddocs/start.asp

Page1 LabMice link followed...
http://www.labmice.net/scripting/batchfiles.htm
http://www.labmice.net/Windows2000/Administration/command.h
tm
http://support.microsoft.com/?kbid=200469
Title = "Effects of Using the START Command at a Command
Prompt"
(The above M$KB article gave the solution, but NOWHERE
DOES IT ACTUALLY USE THE WORDS "space" or "spaces" -
bloody useless.)

In the above M$KB 200469 they state that the CAUSE is...
"The specification for the START command indicates that
the first quoted string becomes the title for the new
window"

This would appear to me to be absolute rubbish. The M$
specification (..start.asp above) indicates
that "["title"]" is OPTIONAL.
Poor coding and inadequate explanation of the syntax are
the true cause.

Cheers and thanks,
Bryan
(BryanDDDOOOTTTTcleaverAaatttRioTintoDDDDOOOTTTcom)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top