listdir reports [Error 1006] The volume for a file has been externally altered so that the opened file is no longer valid
Per Olav Kroka
per.olav.kroka at ericsson.com
Thu Jan 8 08:58:34 CET 2009
FYI: the '/*.*' is part of the error message returned.
From: chris at rebertia.com [mailto:chris at rebertia.com] On Behalf Of Chris
Sent: Wednesday, January 07, 2009 6:40 PM
To: Per Olav Kroka
Cc: python-list at python.org
Subject: Re: listdir reports [Error 1006] The volume for a file has been
externally altered so that the opened file is no longer valid
> PS: Why does the listdir() function add '*.*' to the path?
Don't know what you're talking about. It doesn't do any globbing or add
"*.*" to the path. Its exclusive purpose is to list the contents of a
directory, so /in a sense/ it does add "*.*", but then not adding "*.*"
would make the function completely useless given its purpose.
> PS2: Why does the listdir() function add '/*.*' to the path on windows
> and not '\\*.*' ?
You can use either directory separator (\ or /) with the Python APIs on
Windows. r"c:\WINDOWS\" works just as well as "c:/WINDOWS/".
Follow the path of the Iguana...
More information about the Python-list