[Tutor] How can I copy files recursively?

Richard Querin rfquerin at gmail.com
Tue Jul 11 22:14:34 CEST 2006


On 7/11/06, Alan Gauld <alan.gauld at freenet.co.uk> wrote:
>
>
> Things which are easy in the shell are usually less easy in Python.
> In your case a simple cp -r will copy the files and an rm -rf will
> delete the originals.
>
> Or you could just use mv on the top level folder.
>
>
>
But I don't want the sub folders to come along with the copy. I'd like to
grab the mp3 files out of a set of subfolders and place them all into a
single folder somewhere else.

I'm completely lost when it comes to bash scripting, so I may take Michael
P. Reilly's suggestion as a starting point since it's the only one I
understand at first glance ;).

I'm really a newbie to python programming so readability and understanding
it is first on my list. Efficiency and speed is secondary to me at the
moment.

Thanks to all for the help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060711/e499270e/attachment.html 


More information about the Tutor mailing list