On Wed, May 21, 2014 at 5:25 PM, questions anon <questions.a...@gmail.com> wrote: > I have files contained separately in folders labelled by years and months > and I would like to copy them into another directory where they have > matching folder names of years and months. > I can do this for one folder at a time (see below) but I want it to be able > to go through all the folders (2002/01,2002/02.....2012/11,2012/12) and copy > files from one directory to another directory with matching subdir names.
Side note: do you have a name, or is your first name truly Questions? shutil contains a function for recursively copying entire trees. I think it's called copytree(). Checking... ok, found it. https://docs.python.org/3/library/shutil.html#shutil.copytree Would this be suitable for your situation? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor