Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a windows (explorer) shortcut or non-mouse oriented command to make a toggle a given file's read only status?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Works under XP: Alt+Enter Alt+R Enter

share|improve this answer

attrib is what you're looking for:

attrib +r readonlyfile.txt
attrib -r writeablefile.txt

help attrib says:

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename]
       [/S [/D]]

  +   Sets an attribute.
  -   Clears an attribute.
  R   Read-only file attribute.
  A   Archive file attribute.
  S   System file attribute.
  H   Hidden file attribute.
  [drive:][path][filename]
      Specifies a file or files for attrib to process.
  /S  Processes matching files in the current folder
      and all subfolders.
  /D  Processes folders as well.
share|improve this answer
    
Good answer, though it made me revise my original question because I really wanted a windows explorer shortcut. I'm thinking one doesn't exist, but maybe someone knows of an shell extension or something. –  Peter Turner Mar 16 '10 at 19:43
    
Perhaps using a combination of attrib and the Send To folder would solve your problem. –  heavyd Mar 16 '10 at 19:46
    
You can also add a verb to the context menu which toggles it. –  Joey Mar 17 '10 at 0:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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