home *** CD-ROM | disk | FTP | other *** search
-
-
- W I T H
- =============
-
- 1988 by Fridtjof Siebert.
- Nobileweg 67
- 7000 Stuttgart-40
-
- What is it?
-
- `WITH' is a powerful new CLI-Command that allows you to start any CLI
- Command several times and give it all the files that fit to a
- filepattern as argument.
-
- Arp?
-
- Not to make WITH unnecessarily long, WITH uses ARP's routines. So if you
- don't have installed ARP jet, you'll have to copy arp.library to your libs:
- directory.
-
- How to use WITH?
-
- Usage: WITH <File-Pattern> <Command> [TO File] [ALL] [DIRS] [FILES] [SHOW]
-
- If you start WITH without an argument, you'll get it's usage.
-
- File-Pattern:
- The file pattern is just a normal ARP or AmigaDOS file pattern.
-
- Command:
- Command can be a cli command, or several commands with additional
- options. The locations, where the found filenames are to be put, are
- marked by a "$". You can use several commands and seperate them by
- semicolons.
-
- TO File:
- This optional argument specifies a file to save Command's output. You
- can use this like "TYPE x TO prt:" to print the output.
-
- ALL:
- Set this option if you want Command to be executed on all files that
- are in the directories that fir to the filepattern and in their
- subdirectories.
-
- DIRS and FILES:
- If the option DIRS is set, Command will only be started with
- directories, that fit to the file pattern. If FILES is set, commad
- will only be started files. If neither DIRS nor FILES is set, with
- will use files and directories.
-
- SHOW:
- This options makes WITH display the command[s] with the inserted
- filenames before it executes them. This allows you to track what's
- happening when you use `quite' commands like COPY or DEL.
-
- You can break WITH by pressing ^D, ^E or ^F.
-
- Examples:
-
- Here are some examples to make WITH's usage clear:
-
- WITH *.mod TYPE
-
- Types all files that end ".mod".
-
- WITH * LIST DIRS
-
- Lists all directories.
-
- WITH DF0: LIST ALL DIRS TO Directory
-
- This does something similar to "DIR >Directory DF0: OPT A", but uses
- LIST.
-
- WITH DF0: "COPY $ TO RAM:" ALL FILES SHOW
-
- Copies all files of DF0: to the root-directory of the ramdisk. The
- executed commands are displayed.
-
- WITH DF0:Texts/* "COPY Icons:Text.info $.info" FILES
-
- Copies the icon "Icons:Text.info" to all files in "DF0:Texts".
-
- WITH DF0:* "RENAME $ AS $.txt" ALL FILES
-
- Adds ".txt" to the names of all files in DF0:.
-
- WITH *.def "ECHO File $:; TYPE $"
-
- This is a bit more complex. The ";" seperates the "ECHO" from the
- "TYPE" command. First, echo displays "File " plus the found Filename
- and a ":". Then the file is typed by TYPE.
-
- The result of this command will look like this:
-
- File: Graphic.def:
- DEFINITION MODULE Graphic;
- ...
- END Graphic.
-
- File: Sound.def:
- DEFINITION MODULE Sound;
- ...
- END Sound.
- Done.
-
- WITH works with any commands that do not accept a filepattern. So you
- can use anything, and not just your standard DOS command set.
-
- Bugs:
-
- Some Shells get confused when a '$' occurs in the argument string. If
- this is the case with your shell, try '\$' or '$$'. It will probably
- work then.
-
- Copyright:
-
- WITH is in the public domain. It can be used by anyone freely but not
- commercially.
-
- --- Fridtjof.
-
-