• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

set files as read-only

Is there any way to set a file type as 'read-only' in Windows 8?

For example, I want to automatically set all .exe / .7z / .rar / .iso / .pdf files as read only because I would never want these files modified.
 
You can run a powershell command that would do that. For example, to make all .PDFs in a folder read only you could do:
Code:
Get-Item c:\foldername\*.pdf | foreach {$_.Attributes = 'ReadOnly'}

My powershell and scripting kung-fu is pretty weak, but I know there's a way to use the -Recurse flag to get it to go through sub-folders, too. I'm sure someone else can help tweak it.
 
No, you can't set a default like that. The best you can do is something like seepy83 said and run that periodically. But what goal are you actually trying to achieve? Nothing should be automatically modifying files without your knowledge.
 
You try the attrib command in a DOS box with admin privleges:

at C:\ or whatever drive...type:

attrib *.pdf +r /s

attrib *.iso +r /s

etc.?
 
Back
Top