🐍 Python 3.10+
Show Hidden Files (Python)
Makes File Explorer always show hidden files and folders. Applies the tweak via the stdlib winreg module.
set_show_hidden_files_global.py
#!/usr/bin/env python3
"""
set_show_hidden_files_global.py
Show Hidden Files.
Makes File Explorer always show hidden files and folders.
Usage:
python set_show_hidden_files_global.py
"""
import winreg
def main() -> None:
key = winreg.CreateKeyEx(
winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", 0, winreg.KEY_SET_VALUE
)
winreg.SetValueEx(key, "Hidden", 0, winreg.REG_DWORD, 1)
winreg.CloseKey(key)
print("Show Hidden Files applied.")
if __name__ == "__main__":
main()