读书人

python批改windows文件夹owner

发布时间: 2012-12-16 12:02:32 作者: rapoo

python修改windows文件夹owner
大家好,我现在公司有一个文件夹,里面有不少子文件夹,但每个子文件夹的Owner不一样。现在想统一改成一个Owner (mwdeldev),我刚学Python,还不是很熟悉,我也Google了一下,请问有什么方法可以用Python脚本来修改文件夹所有文件的Owner。谢谢!
[最优解释]
os.chown(path, uid, gid)
Change the owner and group id of path to the numeric uid and gid. To leave one of the ids unchanged, set it to -1.

Availability: Unix.

读书人网 >perl python

热点推荐