"Christopher Spears" <cspears2...@yahoo.com> wrote
I'm trying to move a bunch of files and directories into another
directory.
Unfortunately, I keep getting an error message:
OSError: [Errno 17] File exists: './TAPE_ARCHIVES'
The problem seems to happen when I try to move a directory into another
directory:
I think what is happening is that you are trying to copy something that
has an equivalently named item already existing in the target. When
you do this at a UI the OS asks if you want to replace it, but in a program
it can't do that so it throws the exception. You need to handle that case
by
catching the exception and ignoring it, or stopping or whatever.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor