How to hide a file in Windows? How to set a read only file in Windows? Or set a read only file in Windows and hide it. Setting a file to read only or hiding a file in Windows, or doing both at the same time, can be done using Command Prompt or using PowerShell. Example commands: Hiding a file in Windows using PowerShell: (Get-Item "C:\file_example.txt").Attributes = 'Hidden' Setting a read-only file: (Get-Item "C:\file_example.txt").Attributes = 'ReadOnly' Set both read-only and hidden attributes to a file. (Get-Item "C:\file_example.txt").Attributes = 'Hidden, ReadOnly' How to reset the attributes or remove the attributes that was set? (Get-Item "C:\file_example.txt").Attributes = 'Normal' Hiding a file using command Prompt: c:\attrib +h "file_example.txt" Setting a read-only file: c:\attrib +h "file_example.txt" Set both read-only and hidden attributes to a file. c:\attrib +h +r "file_exa...
Make the world a better place by sharing knowledge, ideas and anything that you can give that comes from the heart.