python3—对windows系统的文件夹与文件隐藏
参考:python3.4对应下载https://www.jb51.net/softs/416131.html
设置文件夹与文件的属性参考:https://www.cnblogs.com/dcb3688/p/4608016.html
判断文件夹与文件是否隐藏参考:https://zhidao.baidu.com/question/136250336664582445.html
确认是否安装成功,如下:
C:\Python34>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32api
>>> import win32con
>>> import win32file
>>>
windows的文件夹与文件属性值信息:
FILE_ATTRIBUTE_READONLY = 1 (0x1) # 属性-隐藏
FILE_ATTRIBUTE_HIDDEN = 2 (0x2) # 属性-隐藏
FILE_ATTRIBUTE_SYSTEM = 4 (0x4) # 属性-系统文件
FILE_ATTRIBUTE_DIRECTORY = 16 (0x10)
FILE_ATTRIBUTE_ARCHIVE = 32 (0x20)
FILE_ATTRIBUTE_NORMAL = 128 (0x80) # 属性-正常
FILE_ATTRIBUTE_TEMPORARY = 256 (0x100)
FILE_ATTR