I'm trying to move a bunch of files and directories into another directory. Unfortunately, I keep getting an error message:
Traceback (most recent call last): File "checkDeviceType.py", line 46, in ? cdt.moveFiles(barcodeList) File "checkDeviceType.py", line 40, in moveFiles shutil.move(f,dst) File "/usr/lib/python2.4/shutil.py", line 190, in move copytree(src, dst, symlinks=True) File "/usr/lib/python2.4/shutil.py", line 111, in copytree os.mkdir(dst) OSError: [Errno 17] File exists: './TAPE_ARCHIVES' The problem seems to happen when I try to move a directory into another directory: >>> import shutil >>> shutil.move("test_dir","stuff") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/shutil.py", line 190, in move copytree(src, dst, symlinks=True) File "/usr/lib/python2.4/shutil.py", line 111, in copytree os.mkdir(dst) OSError: [Errno 17] File exists: 'stuff' Any idea how to pull this off? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor