Error copying a file
Krzysztof Stachlewski
stach at fr.USUN.pl
Fri Apr 16 15:43:44 EDT 2004
Stephen Boulet wrote:
> I'm on win2000. The file is on a CD I burned, and I wanted to copy it to
> a file name that doesn't have any quotation marks in it. The problem is
> that I can't reference the file to begin with. The command:
>
> shutil.copy2(myfile,r'D:\foo.ogg')
>
> can't use the string held in myfile, although os.listdir('directory on
> CD') contains it as the first entry.
>
> It would be nice if I could referene the file in a way that would not
> cause the copy command to fail.
Its not a problem with Python, but with the CD-burning software
which allowed for the illegal char in the filename.
Can you open the file using Explorer? Or move it to disk and rename?
That's the best thing you can do about it.
--
Stach Tlen: stachobywatelpl, GG: 1811474
Jabber: stach at jabber atman pl
More information about the Python-list
mailing list