How to copy a file on Windows while preserving permissions

"Martin v. Löwis" martin at v.loewis.de
Thu Apr 12 23:24:48 CEST 2007


> Can someone who is more familiar than I with the vagaries of Windows file 
> protection and the Python interfaces available to it point me in a useful 
> direction?

To copy a file along with its attributes, try SHFileOperation.

Alternatively, if you have backup privileges, open the file for backup,
then use BackupRead/BackupWrite.

HTH,
Martin



More information about the Python-list mailing list