[Tutor] shutils.copytree

Tony Cappellini cappy2112 at gmail.com
Thu Jan 10 19:37:38 CET 2008

I'm using shutils for the first time, and I've un into a problem.
The docs for copytree are pretty sparse and don't mention any problem situations

Under WinXP, I'm trying to copy a directory tree to a USB device using
copytree, but copytree doesn't like a drive letter as a destination.

copytree('C:\\testdir', 'g:\\')

OsError: Permission denied was displayed

However, when I changed the call to copytree('C:\\testdir', 'g:\\junk')

copytree worked.

Why is the root directory '\\' not a valid destination?

More information about the Tutor mailing list