title: Find files/folders that are modified after a specific date in Python
body: <p>Problem ; find files/folders that are changed after a specific date from a directory structure and copy these to another location (as stated clearly in title as well) (:</p>
  
  <p>By the following ;</p>
  
  <pre><code>def mod():
       """Find files modified today, given a file path."""
       latest = 0
       now = time.strftime('%Y-%m-%d', time.localtime())
       dir = "/home/y33t/"
       for fname in os.listdir(dir):
           if fname.endswith(''):
               modtime = os.stat(os.path.join(dir, fname)).st_mtime
               if modtime &gt; latest:
                   latest = modtime
                   out = time.strftime('%Y-%m-%d', time.localtime(latest))
                   if out == now:
                       print fname, "has changed today. "
                   else:
                       pass
  </code></pre>
  
  <p>I can determine which files are changed at a specific date and copy these to a location. What I would like to achieve is to keep the directory structure as well. An example is as following ;</p>
  
  <pre><code>/testfolder
  ..somefile1
  ..somefile2
  ../testfolder2
  ....somefile3
  ....somefile4
  </code></pre>
  
  <p>and so on...</p>
  
  <p>lets say somefile3 is changed at the specified date and I will save it to another location but while saving, cascaded directory structure should be maintained as well. How can I achieve this in an elegant way ?</p>