# How to start/open a file/folder that contains space in its name through command-line?

2 like 0 dislike
635 views

I'm trying to use the start command in the command prompt to open files and folders, but I'm unable to open files and folders that contain space(s) in their name.

I have tried the following queries (testing on C:\Program Files):

``````start C:\Program Files
start C:/Program\ Files
start C:/"Program Files"
start C:\"Program Files"
start "C:\Program Files"
start "C:/Program Files"
start C:/Program_Files
start C:/Program%20Files
``````

But none of them work

Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:\progra~1 will do the trick

1 like 0 dislike

You would use:

``````start "" "c:\program files\"
``````

That is because the first parameter is used as the title of the window, and is oddly enough, enclosed in double quotes.

Edit:

Here is a source about it: SS64

As an example, if you just type start "title" it opens a new cmd window with the title "title" in the title bar.

answered Nov 28, 2012 by anonymous
edited Nov 28, 2012
Wow, trust who else but Microsoft to come up with something like that!
A simple start /? would have clarified the params for the OP instead of struggling so much. As for "the parameter is enclosed in double quotes for some stupid reason", type start "Isn't it obvious?" cmd with and without quotes and see if you can figure out why the quotes might be required
Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question
"the first parameter is used as the title of the window, and is oddly enough, enclosed in double quotes" and "the parameter is enclosed in double quotes for some stupid reason" implied you were talking about the quotes and were puzzled as to why they were required. As for why they didn't make the parameter optional, I doubt we'll ever know why but I totally agree that it wasn't a great idea. (BTW, if you don't use @, people are not informed of your comments.)
Ah yes, I was unclear. And I know, but I assumed you would check back. Typically I do it, thanks!
0 like 0 dislike

Do you specifically need to use start?

You can use explorer "c:\program files" to give you the effect you are looking for.

answered Nov 28, 2012 by anonymous