os.remove

José Isaías Cabrera jicman at cinops.xerox.com
Mon Nov 13 16:39:33 EST 2000


Greetings...!

I have a W2000 machine running python 1.5.2.  I have the following code.

import os
os.chdir('f:\temp')
os.rename('file.log','file.his')
f:\Nova\Logs\C2861.log f:\Nova\Logs\C2861.his
when I execute this by hand, it works.  When I execute my script, I get:
Traceback (innermost last):
  File "c:\myprograms\email2txt.py", line 986, in ?
    main()
  File "c:\myprograms\email2txt.py", line 980, in main
    CSVFile = ChangeLogsToCSV(NovaRec.keys())
  File "c:\myprograms\email2txt.py", line 900, in ChangeLogsToCSV
    os.rename(logname,newname)
OSError: [Errno 13] Permission denied

This is what logname and newname were:
logname  = 'f:\Nova\Logs\C2861.log'
newname = 'f:\Nova\Logs\C2861.his'

I am logged in as admin in that machine.  Any ideas?

thanks,

jose 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20001113/b899b231/attachment.html>


More information about the Python-list mailing list