On Sep 23, 9:15 am, dwatrous <daniel.watr...@gmail.com> wrote:
> Have you considered using 
> os.walk?http://docs.python.org/library/os.html#os.walk
>
> It won't be completely automated, but I think it should allow you to
> easily walk the directory structure to reproduce it in another
> location.
>
> If the file names/extensions are predictable you might also be able to
> use the ignore attribute in the shutil.copytree function to prevent
> copying files:http://docs.python.org/library/shutil.html#shutil.copytree
>
> Daniel
>

Thanks, that helps.  I could write a function like

def ignore_files(dirpath):
    ignore = []
    for f in os.listdir(dirpath)
        if os.path.isfile(f):
            ignore.append(f)
    return ignore


That seems like it will work (haven't tested yet).  Thanks for the
help.
Jeremy


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to