Saturday 4 November 2017

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


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.



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.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...