Whenever I try to open a document or program with more than one word in the title with the correct syntax (using the "start" command and putting the document or program name in quotations), it opens up a new window of the Windows Command Prompt instead of the document or program. Taking out the spaces of the document or program will open the document or program, but I don't want to have to change the title of all my documents or programs just to be able to open them through Windows Command Prompt or Git Bash.
How do you open a document or program that has more than one word in the title?
start, the first argument that is quoted is assumed to the the title of the
cmd window that is opened.
START "title" [/D path] [options] "command" [parameters]
Always include a TITLE this can be a simple string like "My Script" or just a pair of empty quotes
""According to the Microsoft documentation, the title is optional, but depending on the other options chosen you can have problems if it is omitted.
What you need to do is use an empty string
"" for the window title.
start `""` notepad "my document.txt
notepad is the defualt program for opening
start `""` "my document.txt