Programmer's WorkBench (pwb.hlp) (Table of Contents; Topic list)
Readonly Switch
                                             Up Contents Index Back
─────Programmer's WorkBench─────────────────────────────────────────────────
 
     Readonly (Text)
 
     The Readonly switch specifies the operating-system command invoked
     when PWB attempts to write to a read-only file.
 
     When PWB attempts to overwrite a file that is marked read-only on
     disk, PWB informs you that the file is read-only. It also prompts
     you to confirm that the command specified in the Readonly switch
     is to be run. If you decline to run the Readonly command, PWB
     gives you the opportunity to save the file with a different name.
 
     Syntax
 
     Readonly:[command]
 
     <command>    Operating-system command line.
 
     If no command is specified, PWB prompts you to enter a new file
     name to save the file.
 
     To pass the filename of the current file to the command, specify
     '%s' in the command line. Specify '%%' to pass a literal percent
     sign. You can extract parts of the full path using a special PWB
     syntax.
     See: Filename-Parts Syntax
 
     Caution: Only %s is guaranteed to give the name of the read-only
              file. The %|F syntax gives the current filename (the file
              displayed in the active window), even when PWB is saving
              a different file.
 
     Example:
 
     The Readonly switch setting:
 
     Readonly:Attrib -r %s
 
     removes the read-only attribute from the file on disk so PWB can
     overwrite it.
 
     Default
 
     Readonly:
 
     The Default value specifies that PWB should run no command and
     should prompt for a different filename.
 
     See
 
     Editreadonly, Noedit
     Edit menu, Read Only
                                    -♦-