<p>I need to create a batch file which starts multiple console applications in a Windows .cmd file.  This can be done using the start command.</p>

<p>However, the command has a path in it.  I also need to pass paramaters which have spaces as well.  How to do this?</p>

<p>E.g. batch file</p>

<pre><code>start "c:\path with spaces\app.exe" param1 "param with spaces"
</code></pre>

[{'answer_id': 72726, 'author': 'Curro', 'author_id': 10688, 'author_profile': 'https://Stackoverflow.com/users/10688', 'pm_score': -1, 'selected': False, 'text': '<p>Surrounding the path and the argument with spaces inside quotes as in your example should do. The command may need to handle the quotes when the parameters are passed to it, but it usually is not a big deal.</p>\n'}, {'answer_id': 72758, 'author': 'Steffen', 'author_id': 6919, 'author_profile': 'https://Stackoverflow.com/users/6919', 'pm_score': 4, 'selected': False, 'text': '<p>Escaping the path with apostrophes is correct, but the start command takes a parameter containing the title of the new window. This parameter is detected by the surrounding apostrophes, so your application is not executed.</p>\n\n<p>Try something like this:</p>\n\n<pre><code>start "Dummy Title" "c:\\path with spaces\\app.exe" param1 "param with spaces"\n</code></pre>\n'}, {'answer_id': 72796, 'author': 'Andy', 'author_id': 3857, 'author_profile': 'https://Stackoverflow.com/users/3857', 'pm_score': 8, 'selected': True, 'text': '<p>Actually, his example won\'t work (although at first I thought that it would, too). Based on the help for the Start command, the first parameter is the name of the newly created Command Prompt window, and the second and third should be the path to the application and its parameters, respectively. If you add another "" before path to the app, it should work (at least it did for me). Use something like this:</p>\n\n<pre><code>start "" "c:\\path with spaces\\app.exe" param1 "param with spaces"\n</code></pre>\n\n<p>You can change the first argument to be whatever you want the title of the new command prompt to be. If it\'s a Windows app that is created, then the command prompt won\'t be displayed, and the title won\'t matter.</p>\n'}, {'answer_id': 2005695, 'author': 'user243871', 'author_id': 243871, 'author_profile': 'https://Stackoverflow.com/users/243871', 'pm_score': 0, 'selected': False, 'text': '<p>You are to use something like this:</p>\n<blockquote>\n<p>start /d C:\\Windows\\System32\\calc.exe</p>\n<p>start /d &quot;C:\\Program Files\\Mozilla</p>\n<p>Firefox&quot; firefox.exe start /d</p>\n<p>&quot;C:\\Program Files\\Microsoft</p>\n<p>Office\\Office12&quot; EXCEL.EXE</p>\n</blockquote>\n<p>Also I advice you to use special batch files editor - <a href="http://www.drbatcher.com" rel="nofollow noreferrer">Dr.Batcher</a></p>\n'}, {'answer_id': 11968030, 'author': 'Mark Agate', 'author_id': 1600397, 'author_profile': 'https://Stackoverflow.com/users/1600397', 'pm_score': 1, 'selected': False, 'text': '<p>Interestingly, it seems that in Windows Embedded Compact 7, you cannot specify a title string. The first parameter has to be the command or program.</p>\n'}, {'answer_id': 19316499, 'author': 'Anupam Kapoor', 'author_id': 2870697, 'author_profile': 'https://Stackoverflow.com/users/2870697', 'pm_score': -1, 'selected': False, 'text': '<p>I researched successfully and it is working fine for me. My requirement is to sent an email using vbscript which needs to be call from a batch file in windows. Here is the exact command I am using with no errors.</p>\n\n<pre><code>START C:\\Windows\\System32\\cscript.exe "C:\\Documents and Settings\\akapoor\\Desktop\\Mail.vbs"\n</code></pre>\n'}, {'answer_id': 43467194, 'author': 'Mustafa Kemal', 'author_id': 3835640, 'author_profile': 'https://Stackoverflow.com/users/3835640', 'pm_score': 2, 'selected': False, 'text': '<pre><code>start "" "c:\\path with spaces\\app.exe" "C:\\path parameter\\param.exe"\n</code></pre>\n\n<p>When I used above suggestion, I\'ve got:</p>\n\n<blockquote>\n  <p>\'c:\\path\' is not recognized a an internal or external command, operable program or batch file. </p>\n</blockquote>\n\n<p>I think second qoutation mark prevent command to run. After some search below solution save my day:</p>\n\n<pre><code>start "" CALL "c:\\path with spaces\\app.exe" "C:\\path parameter\\param.exe"\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/72671', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']