Use at a workstation to
View or modify file and directory attributes to determine which operations can be performed with the file or directory
Modify the owner of a file or directory
View or modify the search mode of executable files to determine how the program uses search drives when looking for a file
SYS:PUBLIC\FLAG.EXE path [[+ | -] attribute...] [/option...] [/? | /VER]
Parameter |
Use to |
---|---|
(no parameter) |
If you type FLAG with no parameters, the attribute status of all the files in the current directory appears. |
path |
Specify the path to the file or directory whose attributes or search modes you want to modify. |
+ | - |
Add attributes to a file or directory with the + (plus). Remove attributes from a file or directory with the - (minus). If neither + nor - is used, the attributes will be assigned to the file/directory as specified. If you add and remove attributes in the same command, group all + (plus) attributes together and all - (minus) attributes together. |
attribute |
Specify one or more file or directory attributes. See Directory Attributes and File Attributes. |
/option |
Replace option with any available option. See General FLAG Options. |
/? |
View online help. All other parameters are ignored when /? is used. |
/VER |
View the version number of the utility and the list of files it uses to execute. All other parameters are ignored when /VER is used. |
NOTE:For help with tasks, press F1 in the utility.
Use FLAG options to add or delete directory and file attributes, as defined in the preceding parameters table.
For attributes that can be applied to directories, see Directory Attributes.
For attributes that can be applied to files, see File Attributes.
When you add or delete multiple attributes, include a space between attribute abbreviations.
You can use wildcard characters.
Option |
Use to |
---|---|
/NAME | GROUP = name |
Change the owner of a file or directory. |
/D |
View details about a file or directory. |
/DO |
View or modify only directories in the specified path. |
/FO |
View or modify only files in the specified path. |
/OWNER=name |
View all files or directories owned by a user. |
/M=mode |
Modify search modes of executable files. See Search Modes for Executable Files. |
/S |
Search the subdirectory in the specified path and any subdirectories below that level. |
/C |
Scroll continuously through output. |
IMPORTANT:The syntax is /M=mode. Replace mode with a mode number from the following table.
NOTE:Status flags show attribute information for a file or directory. You can't change these flags.
Status |
Indicates |
---|---|
Cc (Cannot compress) |
The file cannot be compressed because of limited space savings or failures that might have occurred during an unsuccessful compression attempt. If this flag is set for a file, the system will not attempt compression again until the next time the file is saved. To allow the file to be reevaluated for compression, use the COMPFIX utility to reset (turn off) this flag. For information, see Section 1.32, COMPFIX. |
Co (Compressed) |
The file has been compressed. |
M (Migrated) |
The file has been migrated. |
To add Rw and Ic and remove Di and A from all files in the current directory, enter
FLAG *.* +R W Ic -Di A
To view attributes for file STUDENTS in directory sys:\course\winter, enter
FLAG SYS:\COURSE\WINTER\STUDENTS
To give files in drive G: the Hidden attribute, enter
FLAG G:*.* H /FO
To set the search mode to 7 for all executable files in the current directory, enter
FLAG *.* /M=7
To set the search mode to 1 and assign all files in the current directory the Read Write attribute, enter
FLAG *.* RW /M=1