How do I use quotes at the beginning of a cmd?
This is what I want to do.
start /wait ((c:\Program Files\NetDrive2\nd2cmd.exe) -c m -t ftp -blabla)
If i do
start /wait "c:\Program Files\NetDrive2\nd2cmd.exe -c m -t ftp -blabla"
Then an error appears because "Program Files" has a space.
If i do
start /wait "c:\Program Files\NetDrive2\nd2cmd.exe" -c m -t ftp -blabla
It then interprets the argument for start
so that it will also generate an error.
Do I need to overlap an equation like a parenthesis in a regular programming language?
source to share
Start link - launches a program, command or script package (opens in a new window.)
Syntax
START "title" [/D path] [options] "command" [parameters]
Key :
title
Text for the title bar of the CMD window (required.)
path
Launching the catalog.
command
A command, batch file, or executable program is running.
parameters
Parameters passed to the command.
...
Always include TITLE , it can be a simple string like "My Script" or just a couple of empty quotes. "According to Microsoft's documentation, the title is optional, but you may have problems if it is omitted.
The reason you are mistaken if title
omitted is because the first character "
(if present) will be used to delimit the header, therefore start
interpreted "Program Files"
as a header.
If "
there are no symbols , then title
you can omit.
Your command should look like this:
start /wait "My title" "c:\Program Files\NetDrive2\nd2cmd.exe" -c m -t ftp -blabla
source to share