I am unable to use Start from the command line with files with spaces in.

John Savill

March 4, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. A. The Windows NT Start command allows the user to create separate window/process to run a specified program. If you try and run something that consists of a long file name with a space in quotes if fails and just brings up an empty cmd.exe window, e.g.

C:> start "d:documentstfaq bookcontents.doc"

fails. In order to make it work only the part that has the long name should be in quotes, e.g.

C:> start d:documents"ntfaq book"contents.doc

will work OK. This applies to anything such as a server, share etc, e.g.

C:> start \""""""""
e.g. C:> start \"johns server""docs share""ntfaq dir""table of contents.doc"

This is basically down to the fact that the first item in quotes should be the title of the window, and so a better way to work round the problem is to use

C:> start "" "d:documentstfaq bookcontents.doc"

which will now work fine and there can be as many spaces as you want in any part.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like