title: How to express this Bash command in pure Python
body: <p>I have this line in a useful Bash script that I haven't managed to translate into Python, where 'a' is a user-input number of days' worth of files to archive:</p>
  
  <pre><code>find ~/podcasts/current -mindepth 2 -mtime '+`a`+' -exec mv {} ~/podcasts/old \;
  </code></pre>
  
  <p>I am familiar with the os.name and getpass.getuser for the most general cross-platform elements.  I also have this function to generate a list of the full names of all the files in the equivalent of ~/podcasts/current:</p>
  
  <pre><code>def AllFiles(filepath, depth=1, flist=[]):
      fpath=os.walk(filepath)
      fpath=[item for item in fpath]
      while depth &lt; len(fpath):
          for item in fpath[depth][-1]:
              flist.append(fpath[depth][0]+os.sep+item)
          depth+=1
      return flist
  </code></pre>
  
  <p>First off, there must be a better way to do that, any suggestion welcome.  Either way, for example, "AllFiles('/users/me/music/itunes/itunes music/podcasts')" gives the relevant list, on Windows.  Presumably I should be able to go over this list and call os.stat(list_member).st_mtime and move all the stuff older than a certain number in days to the archive; I am a little stuck on that bit.</p>
  
  <p>Of course, anything with the concision of the bash command would also be illuminating.</p>