The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


FA - File Attributes

Summary

FA allows you to view and change file attributes.

Icon

Command Line Format

Usage: FA {Switches} <File Spec> Drive Spec(s)

Switches

+/-r
Set or clear the Read-Only attribute.
+/-a
Set or clear the Archive attribute.
+/-s
Set or clear the System attribute.
+/-h
Set or clear the Hidden attribute.
/a
All disks.
/f
Force file names to lower case.
/h
Hard disks only.
/s
Include subdirectories in the search.

Note : To set a file attribute use the +. To clear a file attribute use the -.

Description

FA allows you to view and change file attributes. If no file specification is given, it is assumed that all files are to be changed. If no changes are requested then the current attributes of the files which match the given file specification are displayed.

For example, if you try to remove a directory (RD) and you get the error message:

SYS0016: The directory cannot be removed.
then check to see if there are hidden files in that subdirectory. If there are no hidden files, then another process may be using the directory.

Note : This is the only utility in the Graham Utilities which requires a "/" instead of a "-" character for the other switches.

+/-r Read-Only Attribute

The Read-Only attribute protects files from being modified or deleted. The use of this option protects a file from being accidentally changed or deleted.

+/-a Archive Attribute

The Archive attribute is set by applications to tell the OS/2 BACKUP command (and other backup utilities) that the file requires backing up. These backup utilities will reset (clear) the archive attribute.

+/-s System Attribute

The System attribute indicates that the file is an OS/2 or operating system related file. Files with this attribute do not appear in the standard OS/2 directory listings.

+/-h Hidden Attribute

The Hidden attribute is set to hide files from normal use. Files with this attribute do not appear in the standard OS/2 directory listings. They cannot be deleted, executed and cannot normally be accessed by most programs.

/a All disks

FA will scan all logical disk drives defined by the system, starting at drive A:. The drives are scanned in order, starting at A:, then B: and so on.

/f Force file names to lower case

On FAT partitions, file names are always displayed in lower case. HPFS partitions retain their case, but the file system does not differentiate between the case of file names, and they are displayed as they were entered. The -f option forces all displayed file names, across all file system types, to be displayed in lower case.

/h Hard disks only

FA will scan all logical disk drives defined by the system, starting at drive C:. The drives are scanned in order, starting at C:, then D: and so on.

/s Subdirectories

FA will include subdirectories as part of its search of the specified disk drives. If a subdirectory name is included as part of the file specification, then the search will include that subdirectory and all subdirectories below it. If no subdirectory is given as part of the file specification, then the current directory and all below it are included in the search.

Examples

FA -r -a -s -h *.*
FA will clear all the attributes of every file in the current directory.
FA -r -a -s -h *.* /s
FA will clear all the attributes of every file in the current directory, and all subdirectories below it.
FA /f *.DLL +r
FA will set the file attribute of all .DLL files in the current directory to read only. In addition, the file names will be printed in lower case.
FA +r +a +s +h C:\IO.SYS
This will set the file attributes of C:\IO.SYS to read only, archive, system and hidden, which is the default state for this file.
FA *.DLL +R /s C: E:
FA will set all .DLL files to read only on the current drive as well as drive C: and E:
FA C:*.DLL +R /s
FA will set all DLL's to read only on drive C: only.