Best way to copy files without Read-Only option

Ken Kinder kkinder at tridog.com
Thu Aug 31 12:32:50 EDT 2000


chmod is a Unix thing. NT does weird stuff for file permissions. If I were
you, I would just say you have to have OS permissions on both ends.

Olav Benum wrote:

> 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
>
> --
> http://www.python.org/mailman/listinfo/python-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kkinder.vcf
Type: text/x-vcard
Size: 257 bytes
Desc: Card for Ken Kinder
URL: <http://mail.python.org/pipermail/python-list/attachments/20000831/59b74b6e/attachment.vcf>


More information about the Python-list mailing list