update the list of directories with only the new ones
<p>I am creating a list (a text file) of all the directories recursively using the code below. Since there are a thousands of sub-directories, I don't want to create the list again and again, but would like to update/insert only the newly created ones from the last time I had listed them.</p>

<p>Is there a good way to do this ?</p>

<pre><code>import os, sys
rootdir ="/store/user/"
myusers=['u1','u2','u3','u4','u5','u6','u7']

for myuser in myusers:
    rootuserdir=os.path.join(rootdir, myuser)
    for myRoot, mySubFolders, myFiles in os.walk(rootuserdir):
        for mySubFolder in mySubFolders:
            dirpath =  os.path.join(myRoot, mySubFolder)
            print dirpath
</code></pre>
