home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff253.lzh / With / With.doc < prev    next >
Text File  |  1989-10-19  |  4KB  |  124 lines

  1.  
  2.  
  3.                              W I T H
  4.                           =============
  5.  
  6.                     1988 by Fridtjof Siebert.
  7.                           Nobileweg 67
  8.                         7000 Stuttgart-40
  9.  
  10. What is it?
  11.  
  12.     `WITH' is a powerful new CLI-Command that allows you to start any CLI
  13.     Command several times and give it all the files that fit to a
  14.     filepattern as argument.
  15.  
  16. Arp?
  17.  
  18.     Not to make WITH unnecessarily long, WITH uses ARP's routines. So if you
  19.     don't have installed ARP jet, you'll have to copy arp.library to your libs:
  20.     directory.
  21.  
  22. How to use WITH?
  23.  
  24.     Usage: WITH <File-Pattern> <Command> [TO File] [ALL] [DIRS] [FILES] [SHOW]
  25.  
  26.     If you start WITH without an argument, you'll get it's usage.
  27.  
  28.     File-Pattern:
  29.       The file pattern is just a normal ARP or AmigaDOS file pattern.
  30.  
  31.     Command:
  32.       Command can be a cli command, or several commands with additional
  33.       options. The locations, where the found filenames are to be put, are
  34.       marked by a "$". You can use several commands and seperate them by
  35.       semicolons.
  36.  
  37.     TO File:
  38.       This optional argument specifies a file to save Command's output. You
  39.       can use this like "TYPE x TO prt:" to print the output.
  40.  
  41.     ALL:
  42.       Set this option if you want Command to be executed on all files that
  43.       are in the directories that fir to the filepattern and in their
  44.       subdirectories.
  45.  
  46.     DIRS and FILES:
  47.       If the option DIRS is set, Command will only be started with
  48.       directories, that fit to the file pattern. If FILES is set, commad
  49.       will only be started files. If neither DIRS nor FILES is set, with
  50.       will use files and directories.
  51.  
  52.     SHOW:
  53.       This options makes WITH display the command[s] with the inserted
  54.       filenames before it executes them. This allows you to track what's
  55.       happening when you use `quite' commands like COPY or DEL.
  56.  
  57.     You can break WITH by pressing ^D, ^E or ^F.
  58.  
  59. Examples:
  60.  
  61.     Here are some examples to make WITH's usage clear:
  62.  
  63.     WITH *.mod TYPE
  64.  
  65.       Types all files that end ".mod".
  66.  
  67.     WITH * LIST DIRS
  68.  
  69.       Lists all directories.
  70.  
  71.     WITH DF0: LIST ALL DIRS TO Directory
  72.  
  73.       This does something similar to "DIR >Directory DF0: OPT A", but uses
  74.       LIST.
  75.  
  76.     WITH DF0: "COPY $ TO RAM:" ALL FILES SHOW
  77.  
  78.       Copies all files of DF0: to the root-directory of the ramdisk. The
  79.       executed commands are displayed.
  80.  
  81.     WITH DF0:Texts/* "COPY Icons:Text.info $.info" FILES
  82.  
  83.       Copies the icon "Icons:Text.info" to all files in "DF0:Texts".
  84.  
  85.     WITH DF0:* "RENAME $ AS $.txt" ALL FILES
  86.  
  87.       Adds ".txt" to the names of all files in DF0:.
  88.  
  89.     WITH *.def "ECHO File $:; TYPE $"
  90.  
  91.       This is a bit more complex. The ";" seperates the "ECHO" from the
  92.       "TYPE" command. First, echo displays "File " plus the found Filename
  93.       and a ":". Then the file is typed by TYPE.
  94.  
  95.       The result of this command will look like this:
  96.  
  97.       File: Graphic.def:
  98.       DEFINITION MODULE Graphic;
  99.         ...
  100.       END Graphic.
  101.  
  102.       File: Sound.def:
  103.       DEFINITION MODULE Sound;
  104.         ...
  105.       END Sound.
  106.       Done.
  107.  
  108.     WITH works with any commands that do not accept a filepattern. So you
  109.     can use anything, and not just your standard DOS command set.
  110.  
  111. Bugs:
  112.  
  113.   Some Shells get confused when a '$' occurs in the argument string. If
  114.   this is the case with your shell, try '\$' or '$$'. It will probably
  115.   work then.
  116.  
  117. Copyright:
  118.  
  119.   WITH is in the public domain. It can be used by anyone freely but not
  120.   commercially.
  121.  
  122. ---  Fridtjof.
  123.  
  124.