pass command line arguments with spaces cmd 1

pass command line arguments with spaces cmd

Wrap the whole command line argument between double quotes
for instance
cmd.exe> \"Client Updater.exe\" -i -s Role=\"Test Role\"
this command has Role as 2 words separated by a space.
This can be re-written as 
cmd.exe> "\"Client Updater.exe\" -i -s Role=\"Test Role\""

Here is what the above code is Doing:
1. The first double quote is to tell the command line that the command line argument is starting.
2. The second double quote is to tell the command line that the command line argument is ending.
3. The third double quote is to tell the command line that the command line argument is starting.
4. The fourth double quote is to tell the command line that the command line argument is ending.
5. The fifth double quote is to tell the command line that the command line argument is starting.
6. The sixth double quote is to tell the command line that the command line argument is ending.

Similar Posts