A
Andrew Koenig
The answer to this question probably involves pywin32 or a similar library.
I would like to copy a file from one place to another on a Windows machine
while preserving as much of the file permissions as it is possible to
preserve with whatever my program's privileges happen to be. If the file is
a directory (i.e. folder), this might require temporarily granting myself
write permission for the directory so I can (recursively) create files in
it--again, assuming that it is possible to do so.
Obviously it would be necessary to determine whether my program's privileges
are sufficient to solve this problem for the particular files in question.
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?
I would like to copy a file from one place to another on a Windows machine
while preserving as much of the file permissions as it is possible to
preserve with whatever my program's privileges happen to be. If the file is
a directory (i.e. folder), this might require temporarily granting myself
write permission for the directory so I can (recursively) create files in
it--again, assuming that it is possible to do so.
Obviously it would be necessary to determine whether my program's privileges
are sufficient to solve this problem for the particular files in question.
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?