title: Python subprocess.call - adding a variable to subprocess.call
body: <p>I'm trying to write a simple program in Python that takes all the music files from my Downloads folder and puts them in my Music folder. I'm using Windows, and I can move the files using the cmd prompt, but I get this error: </p>
  
  <p><code>WindowsError: [Error 2] The system cannot find the file specified</code></p>
  
  <p>Here's my code:</p>
  
  <pre><code>#! /usr/bin/python
  
  import os 
  from subprocess import call
  
  def main():
      os.chdir("C:\\Users\Alex\Downloads") #change directory to downloads folder
  
      suffix =".mp3"    #variable holdinng the .mp3 tag
      fnames = os.listdir('.')  #looks at all files
  
      files =[]  #an empty array that will hold the names of our mp3 files
  
      for fname in fnames:  
          if fname.endswith(suffix):
              pname = os.path.abspath(fname)
              #pname = fname
              #print pname
  
              files.append(pname)  #add the mp3 files to our array
      print files
  
      for i in files:
          #print i 
          move(i)
  
  def move(fileName):
      call("move /-y "+ fileName +" C:\Music")
      return
  
  if __name__=='__main__':main()
  </code></pre>
  
  <p>I've looked at the <a href="http://docs.python.org/2/library/subprocess.html#frequently-used-arguments" rel="nofollow">subprocess</a> library and countless other articles, but I still have no clue what I'm doing wrong.</p>