Recursively Backup Directories

misceverything at gmail.com misceverything at gmail.com
Sat Apr 5 19:56:31 EDT 2008


I am writing a script that will backup specified folders from one hard
drive to another (for example, backup source "C:\DATA", destination "D:
\Backup"), and was thinking of using shutil.  What I would like to do
is recursively backup the specified directories (which copytree will
do), 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.



More information about the Python-list mailing list