home *** CD-ROM | disk | FTP | other *** search
-
- ZAP - by Ken Stillson April 1990 Updated for version 3.3
-
- =-=-=-=-=-=-=
-
- -=- ZAP IS NOT "FREEWARE" - PLEASE READ THE FILE LICENSE.DOC -=-
- -=- IF YOU DECIDE TO USE ZAP ON YOUR COMPUTER(S). -=-
-
- =-=-=-=-=-=-=
- What is ZAP ?
- =-=-=-=-=-=-=
-
- > In General
-
- Zap is one of the growing number of utilities that does a
- little too much to generalize its function completely. As well as
- it's basic functions, ZAP has a lot of short cuts for doing all
- sorts of common operations. It is intended to be useful enough to
- be a replacement for the COMMAND.COM user interface.
-
- > The Menus
-
- On the right hand side of the screen is a menu box. There are
- three different boxes needed to list all the ZAP functions, and two
- for the current values of all the F4 macros. Press the space bar
- to rotate though the menus, or alt-x to jump to menu number x.
-
- > The Beginning
-
- It's original concept and basic format were taken from the
- program "Directory Control" [DC.COM]. The author very much thanks
- the original author of DC, and congratulates him/her on their
- excellent program. Alas, the author of ZAP has been unable to
- determine the identity of the author of DC because the
- documentation for DC was not included on the BBS copy of DC the
- author obtained. PLEASE - do not remove authors credit for their
- hard work by removing necessary documentation from programs - it's
- just not fair !
-
- > Moving Around the Directory Tree
-
- ZAP displays the current directory, one file per line, giving
- basic information about the files. If the list is longer than one
- screen, the cursor keys (include page-up and page-down) can be used
- to look around the list.
-
- You can change the way the list is sorted. Hold down Ctrl and
- press N for Name, E for extension, S for size, D for date, or O for
- original (no sort). Sub-directories are sorted separately, and
- put at the beginning, always sorted by their name. Ctrl-R will
- set the Reverse sort mode, which is a saved default (see "setting
- defaults" below).
-
- ZAP allows you to easily change the current directory. Use the
- cursor keys to move the high-light bar onto the name of a directory
- you want to change to, and press return. The ".." selection will
- go to the parent of the current directory, the "." key will simply
- reload the current one and re-draw the screen. You can short-cut
- to the previous directory by pressing ".", and short-cut to the
- root directory of the current drive by pressing "/" or "\".
-
- You can also jump directly to an entry (without using the
- cursor keys), by pressing the first letter of the name of the
- entry. Then press return to select that directory. To short-cut
- pressing return, hold down shift as you press the letter.
-
- To type in a full directory name to change to, press F9.
- This also allows you to change the current drive. Playing with
- this a little will demonstrate: ZAP lets you move around a very
- large directory tree very quickly and very easily.
-
- > Basic File Operations
-
- ZAP also allows file operations. Pressing return when
- high-lighting a file rather than a directory will run a command
- upon the highlighted file. The idea is this:
-
- RETURN- views the file
- shift-RETURN- edits the file
- ctrl-RETURN- runs the file
-
- For the view and edit functions- you must select your own
- favorite programs to do the operation. You may wish to use the DOS
- "type" and "edlin" programs. See below in the "Setting Defaults"
- section for how to change the programs used.
-
- The first four function keys also provide file operations.
- F1 - copy file
- F2 - delete file
- F3 - move / rename file
- F4 - do ANYTHING to the file
-
- F4 is one of the very special (unique?) features of ZAP.
-
- The whole idea of these functions is that they work on either a
- single file (the highlighted one), or on a set of files (the marked
- or memorized files). F1-3 are obvious normal functions. Note that
- the delete and move operations are very fast.
- F4 works like this: You enter any DOS command using a "@"
- character instead of an individual filename. ZAP will sequentially
- replace the @ by each file that is selected.
- For example, let's say you have a set of files that you would
- like to have sorted. You have a program called SORT which takes
- its first parameter as the source file and its second parameter as
- the destination file. Now all you have to do to sort all these
- files is mark the ones you wish sorted (see below for how to mark
- files), press F4 and type the command:
-
- SORT @ _@
-
- What does this do? ZAP will replace both "@"'s with the first file
- that is marked, thus from that file to a file which has the same
- name, but with a "_" as the first character. This is because many
- such programs will not allow the source and destination files to
- have the exact same name. After executing this command, ZAP will
- do it again with the second marked file, and so on.
-
- Note that by use of the ";" to separate commands, you can
- execute multiple commands on each file. So if you wanted to have
- the destination names match the original ones, you might use:
-
- SORT @ temp; del @; ren temp @
-
- This will sort to the file named temp, remove the unsorted
- file, and rename the temp file to the original's name. Again it
- will be executed sequentially for each marked file.
-
-
-
- > File Marking Procedures and Short-Cuts
-
- The most basic way to mark files is with the + key or right
- arrow key. To unmark files, use the - or left arrow key. As
- usual, the first letter can be used to jump to a filename quickly
- to mark or unmark it. The following function keys also help out in
- marking files:
-
- F5 - clear all marks
- F6 - mark all files
- F7 - toggle all marks (reverse marked and unmarked files)
-
- shift-F5 - clear all marks below highlighted file
- shift-F6 - mark all files below highlighted file
- shift-F7 - toggle all marks below highlighted file
-
-
- > The "Memorized Files"
-
- Here are just a few of some uses of ZAP's ability to memorize a
- list of files:
-
- - Each time a command is executed, ZAP loses its list of marks.
- Obviously, if you want to process a list more than once, this would
- be terrible. ZAP offers several alternatives to saving a list in
- memory or on disk.
-
- - Marks can only mark the files in the current directory. However,
- sometimes you want to operate on files in more than one directory
- in a single process. By appending marked file's pathnames to the
- memorized list, you can effectively ZAP files in more than one
- directory.
-
- The ZAP memory list allows up to 99 files to "memorized." You
- can perform an F4-type function on the entire memorized list
- instead of on the current directory's marks. To do this, just use
- F4, but then use "{@}" instead of "@". [ NOTE: it's likely you
- actually want to use {$}- see the later section on other
- "meta-characters," below.
-
- The following command-keys perform various functions to the
- memorized list:
-
- F4- as explained- perform any command on the list.
- ; - show the list on the screen
- > - write the list to a file
- < - read the list in from a file
- @ - append the filenames of the marked files to the list
- $ - append the PATHNAMES """""" (includes directory)
- _ - mark files in currently directory that are on the list
- DEL - clear the list
- * - toggle "save-mode" (see below)
-
- > Save-Mode
-
- Pressing grey-* switches between two different modes for the
- memorized list. In save-mode, none of the above functions work.
- What save-mode does is this: before every command you execute, it
- automatically types: "DEL-$", and upon it's completion, types "_".
-
- This means that although ZAP usually loses its list of marks
- each time you execute a command, ZAP will use the memorized list to
- hold your marks for you while the command executes, and the
- re-install them to the greatest extent possible after your command
- completes. (Note that your command may have deleted, moved, or
- re-named some of the files that were marked before.) Save-mode
- will also preserve the position of the highlight bar though a
- command's execution.
-
-
- > The Tilde-Directory
-
- Just as it can be handy to save a list of files, it can be
- very handy to save a directory name. For example, say you want to
- move files from one sub-sub-sub-directory to another sub-sub-sub-
- directory. Traditionally, this would take a lot of typing. Not
- with ZAP!
- Use ZAP's shortcuts for changing directories to move to the
- DESTINATION directory. Now press "~". Note in the bottom right
- hand corner of the screen, the new ~ directory is noted.
- Now use the shortcuts to change to the SOURCE directory. Mark
- your files, and press F3 to move them. When ZAP asks for the
- destination directory, just press RETURN and it will default to the
- ~ directory you have set.
-
-
- > The Many Meta-Characters of ZAP
-
- Already mentioned have been the two basic special characters
- for ZAP, @ and {@}. However, their is a variety of different
- special characters that can be used in various contexts to make
- life much easier. Here's a list:
-
- @ - F4 only; replaced sequentially by each marked file
- @. - F4 only; """"""" without it's file-name extension
- $ - F4 only; replaced sequentially by each marked file's PATH-NAME.
- $. - F4 only; """"""" without it's path-name extension
- {@} - F4 only; replaced sequentially by each memorized file's name
- {$} - F4 only; replaced " " " " " " PATH-NAME
- @@ - F4 only; replaced all in one go by a list of the filenames of
- the marked files, separated by spaces. (useful for PKZIP!)
- @, - F4 only; """""""""""""", separated by comma's.
-
- ~ - anywhere; replaced by the ~ directory
- &X - anywhere; replaced by macro X [ see below ]
-
- Notes:
- The ~ meta-char is the default input for any query for a
- pathname, but by using the character itself, you can make
- references to the ~ directory in F4 commands.
-
- > MACROS:
-
- What would any modern program be without built in macros? In
- ZAP, macros serve the basic purpose of saving you typing, in two
- ways. First, pressing an alt-letter at the menu will pass a macro
- automatically to the F4 function. This means commonly executed F4
- functions need not be typed in each time they are used.
- Secondly, anything you need to input to ZAP can have a macro
- replacement done on it. So, for example, if you save a directory
- name to macro D, then to change to that directory quickly, press
- F9, and answer "&D" when asked for the new directory.
-
- To set a new macro value, press "&". ZAP will ask for the
- letter of the macro to save to, and then for the value to save to
- it.
-
- To permanently save your macros, see the section on "Setting
- Defaults," below.
-
- NOTE: Because it is more commonly useful to have a macro use the
- current ~ directory at the time of its execution rather than to at
- its time of definition, the ~ and &x meta-characters will not work
- when entering new macro values.
-
- NOTE: Macros are by default only 20 characters long.
- Obviously, that's not long enough to do many of the things you want
- to do with them. However, if macro A is longer than 20 characters,
- the extra will automatically spill over into macro B. This makes
- macro b useless, but means macro A can be almost as long as you
- like. The same goes for each macro letter.
-
- NOTE: If you end your macro with a ";", it will press RETURN
- and execute itself automatically. If you do not, the macro will be
- placed on the prompt line at the top of the screen, where you can
- add to or edit it before pressing return.
-
- > Mode Switches
-
- ZAP has several modes that can be turned on and off.
-
- ctrl-b - beep mode - beeps whenever a sequential replacement of
- more than 1 item completes.
- ctrl-c - color mode - see below
- ctrl-q - quiet mode - usually ZAP lists each file as it works on
- it. If this slows things down too much or
- annoys you, this mode turns listing off.
- ctrl-r - srt rev - reverse the order of the current sort method
- grey-* - Save-mode - see above
- ctrl-t - type-mode - If on, ZAP will pause when a "view" is done.
- This is useful for using "type" as a viewer,
- otherwise the screen is immediately set back
- to the ZAP menu. If your viewer has you press
- a key to exit, obviously type-mode goes off.
-
- ctrl-g - graphics mode:
- If you have an EGA or VGA monitor, you can use the 43 or 52
- lines-per-screen modes. Press ctrl-g to rotate though your
- available modes. WARNING: unpredictable results may occur if you
- request a graphics mode not supported by your hardware!
-
-
- > Setting defaults:
-
- The ~ directory will always default to the directory that ZAP
- is started in. However, for many other ZAP items, you can set a
- value, and then save it into the ZAP program so that it will stay
- that way the next time you run ZAP.
-
- - The TYPE and EDIT programs
- - All the "MODES" (above)
- - All the macros
- - The directory sort type.
-
- Use ctrl-x to change the TYPE and EDIT programs (in memory).
-
- If you press ctrl-u all the current settings for these items
- will be saved into the ZAP.COM file, and ZAP will start up with
- them the next time you run ZAP.
-
-
- > Special features:
-
- There are several special functions built into ZAP, all of
- which are very fast, and can be very useful in certain
- circumstances.
-
- -- F8: switch ~ and current directories. This is very useful when
- you're using one as the source and the other as a destination
- directory. It also makes the ~ directory a very handy place
- to store a directory temporarily while you go off and do something
- else.
-
- -- ctrl-f: gives the number of kilo-bytes free on the indicated
- drive.
-
- -- ctrl-k: after checking you're sure: delete all files in the
- current directory (fast!).
-
- -- F10: changes the "mask"
- Usually ZAP lists all the files in a directory. If you want
- too see only all the ".COM" files, then you can set the mask to
- "*.COM". Note the mask is also useful in type 3 sweeps (see
- below).
-
- -- ctrl-F2: CHOP DIRECTORY TREE
-
- -=- This is a very dangerous command -=-
-
- -=- It is FAST and DEADLY - it could wipe out huge numbers
- of files in less than a second -=-
-
- What it does is this: highlight a directory, and press ctrl-F2.
- Once you answer "Yes," all the files in that directory, and all the
- files in its sub-directories (recursively), and the directories
- themselves will be deleted.
-
- You may have seen some other programs to do this- try comparing
- ZAP's speed at it sometime. I think you will be impressed.
-
-
- -- ctrl-F9: locate file
-
- You enter a wildcard name (that's a filename with the * naming
- convention), and ZAP will search every drive, starting at the current
- one, from the root directory of each drive, for a file matching the
- wildcard name you have entered.
-
- -- ctrl-F10: filename string search
-
- Same as F9, except instead of searching for a wildcard name,
- you enter any text that can appear anywhere in a filename. For
- example, entering "FF" would be equivalent to searching for
- *FF*.*FF*, which isn't allowed under the normal DOS wildcard rules.
-
- -- ctrl-F4: sweep commands
-
- This is another very useful but rather complicated option.
- This allows you to run a command AT AND BELOW YOUR CURRENT
- DIRECTORY on either every directory or on every single file ZAP
- finds.
-
- type 1- runs the command once per each directory, first running the
- command, and then searching the children directories "depth-first."
-
- type 2- like type 1 except first searches the children directories
- recursively, and then executes the commands in each directory
- "bottom up."
-
- type 3- searches and executes like type 1, except that is runs
- your command individually on every file it finds on the tree. As
- with F4, use "@" to be substituted for the filenames in the
- command.
-
-
- -- the Colorizer (ctrl-c):
-
- This is a cute but occasionally useful feature. ZAP has a
- formula that maps every different file extension to one of sixteen
- colors. Note there are more than sixteen extensions, so there is
- replication. However, with the colorizer turned on, different
- kinds of files show up in different colors, drawing your attention
- easily to the kinds of files you're looking for.
- Experiment with various different sorting for the directory
- (explained above), especially the by-extension sort, when playing
- with the colorizer.
-
- -- Interrupting a sequence:
-
- At any time ZAP is doing a list of things, pressing any key or
- even just holding down the Ctrl key will interrupt ZAP at the
- completion of the current item in the sequence. ZAP will then ask
- you if you would like to continue, stop, or "Shell" to Dos [see
- below]. This also works with +f2, +f4 and +f10. Note however that
- the +F2 function is so fast you really do not want to depend on
- your reflexes to be able to stop it!
-
-
- > The Shell:
-
- ZAP is a very useful and complete utility. However, it
- obviously does not do everything.
-
- It is the author's hope and intention that users will find ZAP
- useful and easy enough that they can use it on-top of COMMAND.COM as
- their standard DOS interface. To further this goal, it is
- necessary that users be able to run other programs, and execute
- commands that ZAP does not handle by itself. This is done by
- pressing "!".
-
- If you press "!" you will be asked for a DOS command. If you
- would like to just do one command, go ahead and enter it. It will
- be executed, and you'll be brought right back to ZAP. If you would
- like to do more than one command, press RETURN, and ZAP will open a
- "shell." That means that you'll be placed back at the DOS prompt,
- and able to type freely. However, ZAP is still hiding in the
- background, and when you type EXIT(return) from DOS, you will go
- right back to ZAP, with everything the way it was when you left it
- (marks included if you have save-mode on).
-
- Note that macro and ~ meta-characters do work with "!". Also,
- note that if an F4 command does not contain any sequential
- meta-characters, it is run once automatically, regardless of the
- number of currently marked files. Thus, if you wish to execute a
- macro to run a program directly, just place it in a macro.
-
- By a "dos command," more than just simple requests like "DIR"
- are intended. Any other program you would like to run can be run
- from the ZAP "!" command. Note that ZAP will take some 51k of
- memory while it hides in the background.
-
- > Conclusion:
-
- Congradulations, you've made it to the end of this file. Over
- 400 lines worth. I hope it was worth it. I would like to take
- this space to thank the many "beta-testers" that have been
- extremely helpful in finding bugs and offering ideas for the
- expansion of ZAP. Almost all of them say they have found ZAP has
- quickly become one of their most used programs, if not their
- permanent DOS interface.
-
- ZAP has taken a long time to put together, and as a full time
- student in computer science at the University of Illinois, time is
- not easy to come by. I sincerely hope that the time I have spent
- on ZAP may make your computer usage easier and more efficient.
- However, I also request that if it does, that you support the
- "Shareware" software system, and heed this program's SHAREWARE
- license. As boring as it may be, please read the file LICENSE.DOC,
- and follow it's instructions.
-
- I cannot guarantee that it will stay open forever, but while it
- is, any comments or suggestions are welcome at my e-mail address:
-
- kds@uiuc.edu
-
-
-
- Enjoy ZAP!
-
-
-