How to delete this file ???

Gerrit Holl gerrit at nl.linux.org
Mon Dec 1 06:39:21 EST 2003


DCK wrote:
> I've path to file, which look like this:
> \\COMPUTER\D$\C++\FILE_TO_DELETE.JPG

What do you mean exactly by: 'looks like'? Is it the full path to the
file? How did you find out?

> This path was generated by os.path.walk() function. When i try to delete
> this file, os.remove() can't find it, os.path.fileexists() can't find it :(

Does the directory exist, e.g., what does
'os.path.exists('\\computer\d$\c++') give as result? And
'os.path.exists('\\computer\d$')? I think a 'd$' is usually a share in
Windows (not sure), maybe you haven't turned the share on (I'm not sure
what 'mounting' is called in Windows)?

> I can delete other files (i.e. \\COMPUTER\D$\C\FILE_TO_DELETE.JPG). I guess
> there's a problem with this C++ directory (++ exacly). I tried to change it
> to C\+\+, but this still not work. I've no idea how to delete this file.
> 
> I work under WinNT 4.0 with sp6, python 2.3 with unicode support. I have
> adminstrator rights.
> Can somebody help me ?

Maybe. Can you give some more precise information? What is your
os.path.walk command? How does it reach this path?

yours,
Gerrit.

-- 
169. If he be guilty of a grave fault, which should rightfully deprive
him of the filial relationship, the father shall forgive him the first
time; but if he be guilty of a grave fault a second time the father may
deprive his son of all filial relation.
          -- 1780 BC, Hammurabi, Code of Law
-- 
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/





More information about the Python-list mailing list