B.7 FLAG (NetWare)

This legacy DOS utility can be used at a workstation to do the following:

B.7.1 Syntax

The flag command is a DOS command line utility, sys:\public\flag.exe.

FLAG is client-side application, not a server-side application. Install the Novell Client for Windows on your workstation, then use the Novell Map Network Drive option in the client menu to map a local drive letter to the sys:\public directory. Open a DOS Command Prompt window, cd to the mapped drive, then issue the flag command from the command line.

flag path [[+ | -] attribute...] [/option...] [/? | /VER]

B.7.2 Options

  • Use FLAG options to set or clear directory and file attributes.

  • You can use wildcard characters.

NOTE:For help with tasks, press F1 in the utility.

Parameters

Parameters

Description

(no option)

If you type FLAG with no parameters, the attribute status of all the files in the current directory appears.

path

Specifies the path to the file or directory whose attributes or search modes you want to modify.

+, -

Sets attributes for a file or directory with the + (plus).

Clear attributes from a file or directory with the - (minus).

If neither + nor - is used, the attributes are assigned to the file/directory as specified.

If you set and clear attributes in the same command, group all + (plus) attributes together and all - (minus) attributes together.

attribute

Specifies one or more file or directory attributes.

See Directory Attributes and File Attributes.

/option

Replaces option with any available option. See General Options.

/?

Views online help. All other parameters are ignored when /? is used.

/VER 

Views the version number of the utility and the list of files it uses to execute. All other parameters are ignored when /VER is used.

General Options

Option

Description

/NAME=name
/GROUP=name

Changes the owner of a file or directory.

/D

Displays details about a file or directory.

/DO

Displays or modifies only directories in the specified path.

/FO

Displays or modifies only files in the specified path.

/OWNER=name

Displays all files or directories owned by a user.

/M=mode

Modifies search modes of executable files. See Search Modes for Executable Files.

/S

Searches the subdirectory in the specified path and any subdirectories below that level.

/C

Scrolls continuously through output.

Search Modes for Executable Files

The syntax is

/M=mode

Replace mode with a mode number from the following table.

Mode

Description

0

Searches for instructions in the net.cfg file (the default mode).

1

Searches the path specified in the file. If there is no path, the file searches the default directory, and then all search drives.

2

Searches the path specified in the file. If there is no path, the file searches only the default directory.

3

Searchesthe path specified in the file. If there is no path, the file searches the default directory; then if the open request is read only, the file searches the search drives.

4

Reserved; don’t use.

5

First searches the path specified and then searches all search drives. If there is no path, the file searches the default directory and then all search drives.

6

Reserved; don’t use.

7

First searches the path specified. If the open request is read only, the file searches the search drives. If there is no path, the file searches the default directory and then all search drives.

B.7.3 Attributes

When you set or clear multiple attributes, include a space between attribute abbreviations.

Directory Attributes

Option

Description

ALL

Specifies the Di, H, Ic, P, Ri, and Sy attributes as a group. Primarily used to assign directories these specific attributes.

Di (Delete Inhibit)

Prevents the directory from being deleted.

This attribute overrides the trustee Erase right. When it is enabled, no one, including the owner and network administrator, can deletet the directory or file. A trustee with the Modify right must disable this right to allow the directory or file to be deleted.

Dm (Don’t Migrate)

Prevents the directory from being migrated to a secondary backup system (regardless of what the volume is set to).

H (Hidden)

Prevents the directory from being seen in the directory listing.

Ic (Immediate Compression)

Compresses the files in the specified directory as soon as the OS can.

This does not apply to the directory’s subdirectories and the files in them. Use Ic in combination with the /S option to apply immediate compression to the directory’s subdirectories and their files recursively.

N (Normal)

Specifies no attributes.

P (Purge)

Purges the directory or files in a directory immediately when deleted.

Ri (Rename Inhibit)

Prevents the directory from being renamed.

Sy (System)

Hides the directory so it does not appear in a file manager or directory listing. System is normally used with operating system files, such as Linux or NetWare system files.

File Attributes

Option

Description

ALL

Specifies the A, Ci, Di, H, Ic, P, Ri, Ro, Sh, Sy and T attributes as a group. Primarily used to assign files these specific attributes.

A (Archive needed)

Indicates that the file has been modified since the last backup.

Ci (Copy Inhibit)

Prevents files from being copied. This attribute overrides the trustee Read right and File Scan right. This attribute works only for clients using Macintosh operating systems to access NSS volumes on NetWare.

Dc (Don’t Compress)

Prevents a file from being compressed.

Di (Delete Inhibit)

Prevents a file from being deleted or copied over.

This attribute overrides the trustee Erase right. When it is enabled, no one, including the owner and network administrator, can delete the directory or file. A trustee with the Modify right must disable this right to allow the directory or file to be deleted.

Dm (Don’t Migrate)

Prevents a file from being migrated to a secondary backup system (regardless of what the volume or directory is set to).

Ds (Don’t Suballocate)

Prevents an individual file from being suballocated, even if suballocation is enabled for the system. Use on files which are enlarged or appended to frequently, such as certain database files.

This flag applies only to files in a NetWare Traditional File System volume.

H (Hidden)

Prevents a filename from being displayed with the DOS DIR command. The file can’t be copied or deleted.

Ic (Immediate Compression)

Compresses a file as soon as the OS can.

N (Normal)

Specifies the Rw attribute.

P (Purge)

Purges a file immediately if the file is deleted.

Ri (Rename Inhibit)

Prevents a file from being renamed.

Ro (Read Only)

Allows a file to only be read; it cannot be modified. Typically, it is used with Ri and Di. Ri and Di.

Rw (Read Write)

Allows a file to be read and written to.

Sh (Shareable)

Allows a file to be used by several users simultaneously. This attribute is usually used with Read Only.

Sy (System)

Hides the directory or file so it does not appear in a file manager or directory listing. System is normally used with operating system files, such as Linux or NetWare system files.

T (Transactional)

Protects a file by using the Transaction Tracking System™.

X (Execute)

Identifies executable files such as .exe and .com files.

Status Attributes

Status attributes show information for a file or directory. You cannot directly modify these flags.

Status

Description

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 does 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 B.4, COMPFIX.

Co (Compressed)

The file has been compressed.

M (Migrated)

The file has been migrated.

B.7.4 Examples

  • 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