Best way to copy files without Read-Only option

Olav Benum Olav.Benum at bigfoot.com
Thu Aug 31 11:50:06 EDT 2000


Greetings!

I am writing a function to copy a directory-tree under Windows NT 4.0.

However, I have the problem that when the source is "Read-only" the new
file
is also read-only, creating problems later.

I have tried os.chmod( filename, 0777), but with no effect.

The solution should also work if I am not the owner of the original
file.

(there seems to be many different copy-functions, with different options

for timestamps etc., but none that doesn't copy the file-permission  :-(

Thanks!
Olav








More information about the Python-list mailing list