Error copying a file
Stephen Boulet
stephendotboulet at motorola_._com
Fri Apr 16 14:46:19 EDT 2004
Krzysztof Stachlewski wrote:
> Stephen Boulet wrote:
>
>> I know that the name of this file is somewhat pathological, but this
>> if weird:
>>
>> >>> print myfile
>> E:\Fritz Reiner\Rimsky-Korsakov--Scheherazade.Debussy--La Mer\01
>> Symphonic Suite after "A Thousand and One Nights" - The Sea and
>> Sinbad's Ship.ogg
>
>
> It seems you are on Windows box.
> What filesystem do you use?
> I have just tried to create such a file, but the filesystem (NTFS)
> refuses to use " as part of the name.
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.
Stephen
More information about the Python-list
mailing list