Readonly

Type

Text

The Readonly switch specifies the operating-system command invoked when PWB attempts to write to a read-only file.

When PWB attempts to overtype 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 filename 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”.

Note that 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.

Default

Readonly:

The default value specifies that PWB should run no command and should prompt for a different filename.

Example

The Readonly switch setting

Readonly:Attrib -r %s

removes the read-only attribute from the file on disk so PWB can overtype it.

See

Editreadonly, Noedit