title: How does subprocess.call differ from os.system
body: <p>I have a python script to install/uninstall some regularly used programs for me and it also does some shortcut/folder clean up after uninstall. I used to use this code to delete a folder</p>
  
  <pre><code>os.system('rd /S /Q "{0}\\{1}"'.format(dirname, name))
  </code></pre>
  
  <p>which worked just fine. I am attempting to convert my usage of <code>os.system</code> to <code>subprocess.call</code> so I changed the above line to this</p>
  
  <pre><code>subprocess.call(['rd', '/S', '/Q', '{0}\\{1}'.format(dirname, name)])
  </code></pre>
  
  <p>but this gives the error</p>
  
  <pre><code>The system cannot find the file specified (2)
  </code></pre>
  
  <p>I must be using subprocess.call incorrectly but I can't work it out. Any help would be appreciated, thanks.</p>