The Graham Utilities for OS/2 - Version 2


[Warpspeed]

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


EABind - Automatically bind EA's to files

Summary

EABind binds data to files as extended attributes.

Icon

Command Line Format

Usage: EABind {Switches} <File>
OR:
Usage: EABind {Switches} File Type EA Name EA Data

Switches

-n
Set EA as needed.
-s
Include subdirectories in the search.

Description

EABind binds data to files as extended attributes. For a discussion on Extended Attributes see Appendix A. EABind needs to know the file to bind the data to, the type of the extended attribute, the extended attribute name and the data to be bound. EABind can process a response file or it can accept parameters from the command line. The response file contains the file name, the extended attribute type, the extended attribute name and the extended attribute data.

With version 2, EABind has now been expanded to include wild card processing. The File parameter can be given a wild card specification. The wild card specification can be provided on either the command line or in a response file.

The EA Data field varies depending on the EA type.

Type
Definition of EA Data
EAT_ASCII
The ASCII string to be bound.
EAT_BINARY
The file name of the binary data to be bound.
EAT_BITMAP
The file name of the bitmap to be bound.
EAT_ICON
The file name of the icon to be bound.
EAT_METAFILE
The file name of the metafile to be bound.

-n Set EA as needed

Extended attributes (EAs) are non-critical by default. A non-critical EA is one which is not necessary to the functionality of the application. If a non-critical EA is lost, the system continues to operate correctly. For example, losing the icons associated with data files does not generally cause any ill effect other than the inability to show the icon.

A critical extended attribute is one which is necessary for the correct operation of the operating system or of a particular operation. EAs should be marked as critical if their loss would cause the system or program to perform incorrectly. For example, a mail program might store mail headers in EAs. The loss of the header from a message would normally render the mail program unable to further use that message. This would be unacceptable, so the mail program should mark this EA as critical.

This switch sets the EA as critical or needed.

-s Subdirectories

EABind will include subdirectories as part of its search for files. The current subdirectory is searched as well as all subdirectories below the current one.

Examples

EABind bindfile
Bindfile is the sample file provided for EABind. It sets the .COMMENTS EA to the default values for the files provided in the Graham Utilities. It also sets the .ICON EA for the files so that they will appear as icons on the desktop.
EABind C:\STARTUP.CMD EAT_ASCII .COMMENTS "This is
the system startup file"
EABind will bind the text string "This is the system startup file" to C:\STARTUP.CMD. The EA name will be .COMMENTS and the type with be EAT_ASCII. This will overwrite any previous .COMMENTS extended attribute. Any other extended attribute will be left unchanged.
EABind *.Ico EAT_ASCII .TYPE Icon
This will get EABind to bind the text string "Icon" to all .ICO files in the current directory. The EA name will be .TYPE and the type will be EAT_ASCII.
EABind *.Ico EAT_ASCII .TYPE Icon -s
EABind will bind the text string "Icon" to all .ICO files in the current subdirectory and all subdirectories below it. The EA name will be .TYPE and the EA type is EAT_ASCII.