title: Batch file Error : "Files was unexpected at this time."
body: <p>I am getting the below error when I pass <code>path</code> as my 2nd argument. It looks like problem is with the space.</p>
  
  <p><code>Files was unexpected at this time</code></p>
  
  <p>I am executing the batch file with following parameters</p>
  
  <p><code>services.cmd 2 "C:\Program Files (x86)\folder\Folder\folder\Bin" corp\acct password</code></p>
  
  <p>CODE:</p>
  
  <pre><code>@echo off
  
  if "%1" == "" goto PARAMS
  if "%2" == "" goto PARAMS
  if "%3" == "" goto PARAMS
  if "%4" == "" goto PARAMS
  
  
  sc create "&lt;service name&gt;"%1 binpath= "\%2\xxx.exe\" \"xxx.exe.config\""
  rem sc config "&lt;service name&gt;"%1 displayname= "&lt;display name&gt;"%1 obj= %3 password= %4 start= auto description= "Runs the service."
  
  
  goto END
  
  :PARAMS
  
  echo Usage CreateServices.cmd binfoldername binfolderpath username password
  
  :END
  </code></pre>