Roberts, Alice wrote:

> Good morning,
>
> Does anyone know of something that will copy a directory tree, but 
> only for files with a specific extension? I found
>
> *copytree*(
>
>       
>
> /src, dst/[/, symlinks/])
>
> , but I wasn’t sure how to assign the src to the string, ie) 
> \\server\share\*.xls.
>
Alice,

shutil.copytree() won't do what you want, but you might consider making 
a modified copy for your own use. It is a pretty simple function and the 
comments even encourage using it as an example to do what you want. You 
can find the source in the Lib directory of your Python installation.

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to