Recursively Backup Directories

Rick Dooling rpdooling at gmail.com
Sat Apr 5 21:48:27 EDT 2008


On Apr 5, 6:56 pm, misceveryth... at gmail.com wrote:
> What I would like to do
> is recursively backup the specified directories . . .
> but be able to specify exclusion directories (which copytree does
> not appear to allow you to do).  My initial thoughts were I'll
> probably have to use os.path.walk for the backup source directory, but
> I'm not sure how to go from there.  Thanks in advance.

There's a nice Python Cookbook recipe.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/191017

I think the one in the book is newer and better

http://tinyurl.com/5vr4n6

And the Cookbook is my favorite way to learn Python.

rd



More information about the Python-list mailing list