While there are plenty of third-party programs to accomplish a task, sometimes you just want to use a built-in method to do the same thing. Today’s SuperUser Q&A post helps a reader find an awesome built-in solution to keep his files from being deleted or overwritten.
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
Notepad screenshot courtesy of Dan (SuperUser).
The Question
SuperUser reader boboes wants to know if there is a built-in method in Windows 7 and newer editions to lock a file and keep it from being overwritten or deleted:
Is there a built-in method for doing this in Windows 7 and newer editions?
I know that there are programs for doing this. My question is if there is a built in mechanism in Windows 7 and newer editions. Sometimes I have to check a script on a PC and do not want to install new programs for that.
There are also some good suggestions here: How to purposefully exclusively lock a file? Unfortunately, they require 3rd party tools or changing the file to a locked state.
The Answer
SuperUser contributors Dan and Breakthrough have the answer for us. First up, Dan:
Followed by the answer from Breakthrough:
While paused, the above script causes the following prompt when attempting to open up “myfile.txt”:
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.