1

I set the properties of a file to read only on my desktop

However, I am able to delete the file with no problems.

If I go into the command line, I do get access denied when trying to delete it so I know the read only attribute is there. It's also by running attrib on the file.

  • 2
    Although that's an interesting observation, why does it matter? What actual problem are you trying to solve? "Why" it's like that is probably only answerable by MS. – Ƭᴇcʜιᴇ007 Aug 7 '14 at 21:59
  • The body of his question doesn't really match the title. I think you're responding to the title and not the body. – Sophit Aug 7 '14 at 22:02
  • You can delete it with the command line. You shouldn't expect the del command to function exactly the same as Explorer's "delete" function. – Jason Aug 7 '14 at 22:03
  • 2
    @Arnold then use the permissions (ACL), that's what they're there for. Read-only is pretty much useless these days, as it can easily just be un-set by a user, especially if there's no file permissions set to prevent them from modifying the attributes. – Ƭᴇcʜιᴇ007 Aug 7 '14 at 22:05
  • 1
    I was just looking for an easy way for a non technical user to create read-only folders without dealing with the security tab and inheritable permissions. I didn't know the read-only attribute was so worthless. – Arnold Aug 7 '14 at 22:18
0

If you want to delete a read-only file using the command line, use del /f.

If you want to prevent someone from deleting a file using either method, change the security permissions of the file (instead of using read-only).

  • 3
    OP's asking why he can delete RO files via Explorer without warning or complaint, not how to delete from the command-line. :) – Ƭᴇcʜιᴇ007 Aug 7 '14 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.