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











up vote
21
down vote

favorite
5












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.










share|improve this question


















  • 4




    Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:progra~1 will do the trick.
    – Bryan
    Nov 27 '12 at 20:21















up vote
21
down vote

favorite
5












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.










share|improve this question


















  • 4




    Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:progra~1 will do the trick.
    – Bryan
    Nov 27 '12 at 20:21













up vote
21
down vote

favorite
5









up vote
21
down vote

favorite
5






5





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.










share|improve this question













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.







windows command-line path filenames whitespace






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 27 '12 at 20:18









amiregelz

5,570103752




5,570103752








  • 4




    Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:progra~1 will do the trick.
    – Bryan
    Nov 27 '12 at 20:21














  • 4




    Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:progra~1 will do the trick.
    – Bryan
    Nov 27 '12 at 20:21








4




4




Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:progra~1 will do the trick.
– Bryan
Nov 27 '12 at 20:21




Not strictly speaking the answer you're looking for (hence posted as a comment), but start c:progra~1 will do the trick.
– Bryan
Nov 27 '12 at 20:21










4 Answers
4






active

oldest

votes

















up vote
22
down vote



accepted










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.






share|improve this answer



















  • 3




    What's with the empty one?
    – Cole Johnson
    Nov 27 '12 at 20:25






  • 1




    +1; interesting, would love to know how this works?
    – Bryan
    Nov 27 '12 at 20:26






  • 3




    It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
    – nerdwaller
    Nov 27 '12 at 20:27










  • Wow, trust who else but Microsoft to come up with something like that!
    – Bryan
    Nov 27 '12 at 20:28






  • 2




    Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
    – nerdwaller
    Nov 28 '12 at 1:08


















up vote
12
down vote













Do you specifically need to use start?



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






share|improve this answer

















  • 1




    Didn't know about this one. Is there any difference between start and explorer?
    – amiregelz
    Nov 27 '12 at 20:38










  • Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
    – nerdwaller
    Nov 27 '12 at 20:40










  • This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
    – Bryan
    Nov 27 '12 at 20:42








  • 2




    @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
    – Bryan
    Nov 27 '12 at 20:43






  • 1




    I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
    – nerdwaller
    Nov 27 '12 at 20:45




















up vote
0
down vote













If you are already in the current directory, you could always do this.



C:>cd "C:Program Files"

C:Program Files>start .

C:Program Files>





share|improve this answer




























    up vote
    0
    down vote













    Type cd space and press Tab it will give you the directory items list, simple.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f511486%2fhow-to-start-open-a-file-folder-that-contains-space-in-its-name-through-command%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      22
      down vote



      accepted










      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.






      share|improve this answer



















      • 3




        What's with the empty one?
        – Cole Johnson
        Nov 27 '12 at 20:25






      • 1




        +1; interesting, would love to know how this works?
        – Bryan
        Nov 27 '12 at 20:26






      • 3




        It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
        – nerdwaller
        Nov 27 '12 at 20:27










      • Wow, trust who else but Microsoft to come up with something like that!
        – Bryan
        Nov 27 '12 at 20:28






      • 2




        Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
        – nerdwaller
        Nov 28 '12 at 1:08















      up vote
      22
      down vote



      accepted










      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.






      share|improve this answer



















      • 3




        What's with the empty one?
        – Cole Johnson
        Nov 27 '12 at 20:25






      • 1




        +1; interesting, would love to know how this works?
        – Bryan
        Nov 27 '12 at 20:26






      • 3




        It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
        – nerdwaller
        Nov 27 '12 at 20:27










      • Wow, trust who else but Microsoft to come up with something like that!
        – Bryan
        Nov 27 '12 at 20:28






      • 2




        Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
        – nerdwaller
        Nov 28 '12 at 1:08













      up vote
      22
      down vote



      accepted







      up vote
      22
      down vote



      accepted






      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.






      share|improve this answer














      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.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Nov 27 '12 at 20:29

























      answered Nov 27 '12 at 20:23









      nerdwaller

      12k12739




      12k12739








      • 3




        What's with the empty one?
        – Cole Johnson
        Nov 27 '12 at 20:25






      • 1




        +1; interesting, would love to know how this works?
        – Bryan
        Nov 27 '12 at 20:26






      • 3




        It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
        – nerdwaller
        Nov 27 '12 at 20:27










      • Wow, trust who else but Microsoft to come up with something like that!
        – Bryan
        Nov 27 '12 at 20:28






      • 2




        Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
        – nerdwaller
        Nov 28 '12 at 1:08














      • 3




        What's with the empty one?
        – Cole Johnson
        Nov 27 '12 at 20:25






      • 1




        +1; interesting, would love to know how this works?
        – Bryan
        Nov 27 '12 at 20:26






      • 3




        It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
        – nerdwaller
        Nov 27 '12 at 20:27










      • Wow, trust who else but Microsoft to come up with something like that!
        – Bryan
        Nov 27 '12 at 20:28






      • 2




        Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
        – nerdwaller
        Nov 28 '12 at 1:08








      3




      3




      What's with the empty one?
      – Cole Johnson
      Nov 27 '12 at 20:25




      What's with the empty one?
      – Cole Johnson
      Nov 27 '12 at 20:25




      1




      1




      +1; interesting, would love to know how this works?
      – Bryan
      Nov 27 '12 at 20:26




      +1; interesting, would love to know how this works?
      – Bryan
      Nov 27 '12 at 20:26




      3




      3




      It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
      – nerdwaller
      Nov 27 '12 at 20:27




      It's a title for the window, the parameter is enclosed in double quotes for some stupid reason. I rarely use Windows, especially when they do this stuff that makes little sense to me. In linux the CLI would be -t or whatever for title.
      – nerdwaller
      Nov 27 '12 at 20:27












      Wow, trust who else but Microsoft to come up with something like that!
      – Bryan
      Nov 27 '12 at 20:28




      Wow, trust who else but Microsoft to come up with something like that!
      – Bryan
      Nov 27 '12 at 20:28




      2




      2




      Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
      – nerdwaller
      Nov 28 '12 at 1:08




      Yes, it is obvious why quotations are needed. However, why that is not an optional parameter is not. That's the question.
      – nerdwaller
      Nov 28 '12 at 1:08












      up vote
      12
      down vote













      Do you specifically need to use start?



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






      share|improve this answer

















      • 1




        Didn't know about this one. Is there any difference between start and explorer?
        – amiregelz
        Nov 27 '12 at 20:38










      • Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
        – nerdwaller
        Nov 27 '12 at 20:40










      • This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
        – Bryan
        Nov 27 '12 at 20:42








      • 2




        @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
        – Bryan
        Nov 27 '12 at 20:43






      • 1




        I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
        – nerdwaller
        Nov 27 '12 at 20:45

















      up vote
      12
      down vote













      Do you specifically need to use start?



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






      share|improve this answer

















      • 1




        Didn't know about this one. Is there any difference between start and explorer?
        – amiregelz
        Nov 27 '12 at 20:38










      • Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
        – nerdwaller
        Nov 27 '12 at 20:40










      • This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
        – Bryan
        Nov 27 '12 at 20:42








      • 2




        @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
        – Bryan
        Nov 27 '12 at 20:43






      • 1




        I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
        – nerdwaller
        Nov 27 '12 at 20:45















      up vote
      12
      down vote










      up vote
      12
      down vote









      Do you specifically need to use start?



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






      share|improve this answer












      Do you specifically need to use start?



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







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 27 '12 at 20:24









      Bryan

      1,32321635




      1,32321635








      • 1




        Didn't know about this one. Is there any difference between start and explorer?
        – amiregelz
        Nov 27 '12 at 20:38










      • Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
        – nerdwaller
        Nov 27 '12 at 20:40










      • This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
        – Bryan
        Nov 27 '12 at 20:42








      • 2




        @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
        – Bryan
        Nov 27 '12 at 20:43






      • 1




        I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
        – nerdwaller
        Nov 27 '12 at 20:45
















      • 1




        Didn't know about this one. Is there any difference between start and explorer?
        – amiregelz
        Nov 27 '12 at 20:38










      • Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
        – nerdwaller
        Nov 27 '12 at 20:40










      • This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
        – Bryan
        Nov 27 '12 at 20:42








      • 2




        @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
        – Bryan
        Nov 27 '12 at 20:43






      • 1




        I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
        – nerdwaller
        Nov 27 '12 at 20:45










      1




      1




      Didn't know about this one. Is there any difference between start and explorer?
      – amiregelz
      Nov 27 '12 at 20:38




      Didn't know about this one. Is there any difference between start and explorer?
      – amiregelz
      Nov 27 '12 at 20:38












      Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
      – nerdwaller
      Nov 27 '12 at 20:40




      Start is built to run a command through, so it would build a window and run a script. Explorer opens explorer, plain and simple.
      – nerdwaller
      Nov 27 '12 at 20:40












      This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
      – Bryan
      Nov 27 '12 at 20:42






      This article details some command line switches (work on Win 7, despite it specifying Win XP) that do funky things, such as open an explorer window and highlight a specific file, e.g. explorer /select,c:WindowsSystem32calc.exe
      – Bryan
      Nov 27 '12 at 20:42






      2




      2




      @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
      – Bryan
      Nov 27 '12 at 20:43




      @nerdwaller, explorer, will also launch an app, e.g. explorer c:WindowsSystem32calc.exe.
      – Bryan
      Nov 27 '12 at 20:43




      1




      1




      I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
      – nerdwaller
      Nov 27 '12 at 20:45






      I apologize for omitting that. Documents and such as well explorer Documentsexample.xlsx Thank you for pointing it out! I always wonder how people can work in the normal CMD, after working through the linux terminal... Haha. Autocomplete is a joke for commands...!
      – nerdwaller
      Nov 27 '12 at 20:45












      up vote
      0
      down vote













      If you are already in the current directory, you could always do this.



      C:>cd "C:Program Files"

      C:Program Files>start .

      C:Program Files>





      share|improve this answer

























        up vote
        0
        down vote













        If you are already in the current directory, you could always do this.



        C:>cd "C:Program Files"

        C:Program Files>start .

        C:Program Files>





        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          If you are already in the current directory, you could always do this.



          C:>cd "C:Program Files"

          C:Program Files>start .

          C:Program Files>





          share|improve this answer












          If you are already in the current directory, you could always do this.



          C:>cd "C:Program Files"

          C:Program Files>start .

          C:Program Files>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 3 '12 at 18:45









          dmcgill50

          248314




          248314






















              up vote
              0
              down vote













              Type cd space and press Tab it will give you the directory items list, simple.






              share|improve this answer



























                up vote
                0
                down vote













                Type cd space and press Tab it will give you the directory items list, simple.






                share|improve this answer

























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Type cd space and press Tab it will give you the directory items list, simple.






                  share|improve this answer














                  Type cd space and press Tab it will give you the directory items list, simple.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 27 '12 at 12:53

























                  answered Dec 27 '12 at 12:04









                  vishal sharma

                  1171210




                  1171210






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f511486%2fhow-to-start-open-a-file-folder-that-contains-space-in-its-name-through-command%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Список кардиналов, возведённых папой римским Каликстом III

                      Deduzione

                      Mysql.sock missing - “Can't connect to local MySQL server through socket”