[python-win32] [Errno 2] No such file or directory:
Ahmed, Shakir
shahmed at sfwmd.gov
Wed Jul 26 21:33:15 CEST 2006
HI All,
I am trying to change the file permission for all of the files in a
directory but getting errno 2, the code is as follows, any help is
highly appreciated. I am using pythonwin version 2.1
permission.py
for fl in os.listdir("V:\\data\\tst\\mdb"):
import os
def unicode_test(fl):
try:
f = file(fl, 'w')
f.close()
except IOError, e:
print e
return
try:
os.chmod(fl, -0777)
except OSError, e:
print e
====
The error I am getting :
>>> [Errno 2] No such file or directory: 'gend_taskstatus.mdb'
[Errno 2] No such file or directory: 'str.mdb'
Regards,
Shakir
More information about the Python-win32
mailing list