setfile(1) setfile(1)NAME setfile - sets attributes for Macintosh files, such as file type and creator SYNOPSIS setfile [-aattribute-string] [-ccreator] [-lhorizontal-pixels,vertical-pixels] [-ttype] [data-file]... ARGUMENTS -aattribute-string Enables or disables any one or more Boolean attributes for a file through the inclusion of uppercase or lowercase letters in attribute-string. Use uppercase characters to enable the attribute and lowercase characters to disable the attribute: a A Enables or disables the switch-launch attribute (if possible). d D Enables or disables the desktop-located attribute. i I Enables or disables the initial attribute. l L Enables or disables the locked attribute. m M Enables or disables the shared attribute. s S Enables or disables the system attribute. v V Enables or disables the invisible attribute. -ccreator Sets the creator attribute for the file to the four- letter string creator. Replace creator with the actual strings used by a Macintosh application. creator code includes spaces, tabs, or metacharacters. Enclose the code in quotation marks. data-file Specifies the Macintosh file to be changed. If you are working with a pair of AppleDouble files, specify the name of the data file only, not the name of the header file. The setfile command automatically looks for the January 1992 1
setfile(1) setfile(1)associated header file, which should have the same name as the data file, but with a percent sign (%) prefix. If setfile cannot find the header file, it creates one. -lhorizontal-pixels,vertical-pixels Sets the horizontal and vertical coordinates for the icon location to horizontal-pixels pixels from the left extreme and vertical-pixels pixels from the upper extreme. -ttype Sets the type attribute for the file to the four-letter string. Replace type with the actual strings used by a Macintosh application. type code includes spaces, tabs, or metacharacters. Enclose the code in quotation marks. DESCRIPTION setfile sets the file type and creator of an AppleSingle file or the header file of an AppleDouble pair. See Inside Macintosh, Volume III, for a description of file types and creators. Most Macintosh applications open a document file only if they recognize the type and creator. The Macintosh OS stores a file's type and creator in the directory. A/UX stores the type and creator as an entry in either an AppleSingle file or the header file of an AppleDouble pair. When an A/UX Toolbox application creates a file by using the normal File Manager routines, it automatically creates an AppleSingle file with the appropriate type and creator. (See the description of the File Manager in Chapter 4 of Inside Macintosh.) The setfile command is useful when a file's type and creator are lost during a file transfer from the Macintosh environment to A/UX. The setfile program is also useful when you want to use a data file that was created by the standard A/UX file system instead of the A/UX Toolbox File Manager. The usual symptom of an incorrect type is the file's failure to appear in the Open Standard File dialog box. EXAMPLES This command establishes the type of the data files `report' and `house' as PNTG and the creator as MPNT: setfile -t PNTG -c MPNT report house 2 January 1992
setfile(1) setfile(1)FILES /mac/bin/setfile Executable file SEE ALSO derez(1), rez(1) January 1992 3