title: How to get two or more commands together into a batch file
body: <p>I want to enter a command in command prompt after reaching a specific location. How can I achieve this?</p>
  
  <p>e.g.,</p>
  
  <pre><code>set PathName="X:\Web Content Mgmt\Completed Filtering\2013_Folder"
  set comd="dir /b /s *.zip"
  start "cmd" cd /d %PathName%
  </code></pre>
  
  <p>I am opening the command prompt and giving it a path using <code>PathName</code>.  Now after reaching that specific path I want to insert the <code>comd</code> variable into the command prompt to get the desired result.</p>
  
  <p>These are the specific commands I am trying to execute in the batch file:</p>
  
  <pre><code>Microsoft Windows [Version 6.1.7601]
  Copyright (c) 2009 Microsoft Corporation. All rights reserved.
  C:\Users\anoopn&gt;x:
  X:\&gt;cd
  X:\Web Content Mgmt\Completed Filtering\2013_Folder
  X:\Web Content Mgmt\Completed Filtering\2013_Folder&gt; dir /b /s *.zip &gt; C:\Users\anoopn\Desktop\abc.csv
  </code></pre>