The only file flag that os.chmod supports on Windows is the readonly flag, which we definitely don't care to copy. Matt's comment on first version: http://markmail.org/message/vdnpdilu3p7oaq7q V2: new util.copymode function with platform specific implementations