Pergunta

so recently, a technologically clever fellow hid all the files in my school's most frequently accessed and most important public networked mounted drives.

now, as the problem hasn't yet been fixed, i see it as an opportunity to expand my knowledge on python. I would like if there is a module that allows me to edit the properties of files in folders in general. !!EDIT: Windows folders.

not the /contents/, the properties. like the date/time accessed, images of mp3 music, and more importantly, the hidden/not hidden status of files.

Foi útil?

Solução

You can use the Python for Windows package to access a wide range of Windows API's. In particular, the SetFileAttributes function will be useful. You can see an example here. There are other API's such as GetFileAttributes and GetFileAttributesEx to can use to get more information. they'll be defined in the same place as SetFileAttributes.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top