FILE_READ_ONLY

FILE_READ_ONLY F

SETS THE ATTRIBUTE "READ ONLY" OF THE FILE F

  • Type: Command
  • Parameter: 1
  • Group: Files

ACTION

The command FILE_READ_ONLY F sets the attribute "read only" of the file F.

Remark: the command FILE_READ_ONLY_OFF F cancels the attribute "read only" of the file F.

F is the absolute or relative name of the file.

The absolute name is the entire name, related to the root of the file system (ex: "c:\temp\file.txt").

The relative name is the name of the file related to the current directory (ex: "file.txt" or "/file.txt" or "\file.txt").

SYNTAX: FILE_READ_ONLY F

  • F = absolute or relative name of the file.

USE

  • The command FILE_READ_ONLY is used to mark a file as read only file.

ERROR

  • If file F does not exist.
  • If F is not a correct name of file.

EXAMPLE

rem mark the file "test.txt" in "read only"

file_read_only "test.txt"

SEE ALSO

FILE_ARCHIVE

FILE_ARCHIVE_OFF

FILE_HIDE

FILE_HIDE_OFF

FILE_READ_ONLY_OFF

FILE_SYSTEM

FILE_SYSTEM_OFF