home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / PROG / REXX / CMD / FT.ZIP / FT.DOC < prev   
Encoding:
Text File  |  1994-02-08  |  4.6 KB  |  108 lines

  1. ***************************************************************************
  2. FT.CMD - File Type Modifier
  3.  
  4. Version 1.0
  5.  
  6. Copyright (c) Lachlan O'Dea 1994
  7. ***************************************************************************
  8.  
  9. Description:
  10.  
  11. FT.CMD allows the modification of a file's type Extended Attribute (EA).
  12. The type EA tells OS/2 what kind of data the application holds and what
  13. applications can access the file.
  14.  
  15. FT accepts all normal OS/2 wildcards in the file specification and can
  16. optionally search subdirectories for matching files. This allows the easy
  17. modification of many files with one command.
  18.  
  19. When specifying a file type, you don't have to type the full name. FT will
  20. match what you enter with the types defined on your system. If more than
  21. one type matches, FT will display a list of the matching types, from which
  22. you can choose the one you want.
  23.  
  24. It is also possible to specify a type as "default". This moves it to the
  25. front of a file's type list. This _usually_ has the effect of making the
  26. application associated with that type the default on the file's open menu.
  27. I say usually because if all types are deleted, "Settings" seems to become
  28. the default.
  29.  
  30.  
  31. Usage:
  32.  
  33. FT [FileSpec] [/a "Type" "Type"...] [/r "Type" "Type"...] [/d "Type"] [Options]
  34.  
  35.   FileSpec is any normal filename, including * and ?
  36.   /a Specifies the types to be added to the file
  37.   /r Specifies the types to removed from the file
  38.   /d Specifies the type to be made default
  39.   Options:
  40.     /l Lists the types associated with the file after adding/removing
  41.     /s Search subdirectories for matching files also
  42.  
  43.   When specifying a type, you only need to enter the first few letters. FT
  44.   will match what you enter with the list of types in your system. If more
  45.   than one type will match (eg "Bi" matches both "Bitmap" and "Binary Data")
  46.   then FT displays a numbered list of the matching types. Make a selection
  47.   by entering a number. If you enter 0 for none, than that type is ignored.
  48.  
  49.   If the list of matching types is long, FT will pause the display. Pressing
  50.   "U" will display the previous screen, "D" the next screen and Enter will
  51.   allow you to enter a choice.
  52.  
  53. eg:
  54.   FT C:\*.WAV /a "Digital Audio" /s /l
  55.   Adds the type "Digital Audio" to all .WAVs on drive C and lists the results
  56.   for each file
  57.  
  58.   FT * /a "My WP Document" /r "Plain Text"
  59.   Adds the type "My WP Document" and removes "Plain Text" from all files in
  60.   the current directory
  61.  
  62.   FT AFile.Ext /a "B"
  63.   Adds a type starting with B to AFile.Ext. If more than one type starts with
  64.   B, then FT will ask you to choose one.
  65.  
  66.  
  67. Installation:
  68.   Just stick FT.CMD somewhere in your path. FT is a Rexx routine so your
  69.   system must have Rexx installed.
  70.  
  71. Notes and Limitations:
  72.  
  73. * All types must be enclosed in quotation marks and are case sensitive
  74. * The /l option lists the types in the order they appear in the EAs, so the
  75.   default type is first in the list
  76. * If you try to add a type already present, or remove a type not present,
  77.   no action is taken
  78. * When specifying a default type, that type must already be associated with
  79.   the file, otherwise no action is taken. You can simply specify the
  80.   type in the "/a" parameter of the same command to ensure this.
  81. * As any type you specify is matched with the types defined in the system,
  82.   FT does not allow you to add or remove other type names. The types OS/2
  83.   knows about are in the PMWP_ASSOC_TYPE entry in OS2.INI. These include
  84.   the standard types (OS/2 Command File, Plain Text, Icon, etc) as well as
  85.   any belonging to other applications (123 Spreadsheet, etc). If anyone
  86.   knows of a better way to find the "defined" types, please let me know, 
  87.   as I think it's better not to use OS/2's INI entires if possible.
  88. * I've tested FT as best I can, but I can give no guarantees as to its
  89.   reliability. In particular, the settings notebook has some unusual
  90.   behaviour which FT does not account for. If the file has no type entries
  91.   in its EAs, then settings seems to report a default type (usually
  92.   "Plain Text") as present. Also, if settings are used to remove all a
  93.   file's types, then a single entry "Reserved" appears in the EAs. FT
  94.   can't do anyting with this type as it isn't in OS2.INI (see above). If
  95.   anyone knows how the settings notebook works with respect to EAs, please
  96.   let me know.
  97.  
  98.  
  99. Miscellaneous:
  100.  
  101. You can copy FT as much as you want.
  102.  
  103. I'm not very experienced with Rexx, so the program can probably use some
  104. major improvements.
  105.  
  106. If you have any suggestions/comments, please mail me at:
  107.   drizzt@yoyo.cc.monash.edu.au
  108.