up vote 5 down vote favorite
share [g+] share [fb]

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

link|improve this question

71% accept rate
feedback

2 Answers

up vote 1 down vote accepted

Works under XP: Alt+Enter Alt+R Enter

link|improve this answer
feedback

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.
link|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
feedback

Your Answer

 
or
required, but never shown

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