title: Sleep command in batch file?
body: <p>When I'm writing a batch file to run automatically, how do I write it so that when the batch file is run, it can pause for a couple seconds in between commands?</p>
  
  <p>Context:</p>
  
  <pre><code>psexec \\server -u user -p pass cmd
  [there needs to be a pause here for psexec to establish a connection]
  dir /s &gt;output.txt \\server\shared
  </code></pre>
  
  <p>*Note: the reason I run the dir command server-side using psexec and not locally is because it's much faster to run dir on a local machine than remotely, and time is of the essence.</p>
  
  <p>When I'm doing this by hand it's obviously easy, I just wait. But running a batch file makes it run all commands at near instant speeds next to each other, regardless of the completion status of the last command. How do I put in a pause?</p>