Main Help Page | Home Page (Internet) | Menus and Windows | Release Notes

This file documents the following utilities:

Batch Command

Zoom Shell can perform a command on all the files that match a pattern in a directory. For example,

batch -w notepad *.txt

will tell notepad to open each file in the current directory that ends with ".txt". Each file is processed in turn. Zoom Shell processes the next file when you close the application, or the application closes itself. Batch's syntax is as follows:

batch {command} {filespec} Run the commands from a batch file.

batch -n {command} {filespec} Don't wait at all -- run them all at once!

batch -s {command} {filespec} Run the next one when you switch applications. (ALT + TAB)

batch -w {command} {filespec} Run the next one when the first is done (32 bit exe's only)

batch -r {command} {filespec} Recurse through subdirectories -- can be combined with the other switches.

batch -d {command} {filespec} Descend through subdirectories which match the filespec -- see find for an explanation of the difference between -r and -d.

If you want to run the commands as an actual batch file, do not use the s, w, or n switches. Zoom Shell will build and run a temporary batch file for you. In Windows NT, the next command will only be run after the first is done, but in Windows 95, most commands will run one right after the other, without waiting for the completion of the previous command. This can lead to many, many open windows!

If you wish to generate a batch file and keep it to run at your leisure, use batch like a function:

batch(my_filename) notepad *.txt

Limitations:

  1. The -w switch does not work for some programs, including 16-bit programs.
  2. Only the first regular expression given is evaluated. The following will not work as expected: batch zip * *.exe. Only the first asterisk will be expanded.

Note:

If you combine switches, n will always take precedence, and s will take precedence over w.

Clipboard

Zoom Shell can keep copies of the clipboard, in numbered files. It only remembers text (no graphics or files selected in Windows Explorer). It stores the clipboard in files, so the text is stored indefinitely.

Zoom Shell has three commands to manipulate the clipboard, for storage, retrieval, and deletion:

cbs: (Store)

cbs (store text in the next available register)

cbs 3 (store text in the third register)

cbr: (Recall)

cbr (get a summary of what is currently stored)

cbr 3 (recall what is in the third register)

cbc: (Clear)

cbc (clear everything (you will be prompted))

cbc 3 (clear the third register)

Closing Windows

Zoom Shell can shut down Windows for you. Logoff will log you out of Windows; reboot will reboot the machine; and shutdown will shut the machine down. If you have the necessary privileges and you telnet to your Windows NT machine, you can use reboot to boot it remotely, sometimes even when the machine is hung. The three commands have the same options:

reboot (reboot, allowing applications to gracefully close)

reboot -9 (force an immediate reboot)

reboot -AnyLetter (prompt before rebooting)

Logoff, reboot and shutdown each allow applications to save data prior to Windows closing. That way, any logoff, reboot or shutdown can be thwarted by an application asking you to save your data. However, you may need Windows to force all applications closed, in which case you can use the "-9" switch. Don't use "-9" unless you have to.

If you give any letter as a switch, Zoom Shell will ask before rebooting (or logging off or shutting down). That way you can safely program function keys to run these commands.

Zoom Shell makes an alias of logout for logoff, and restart for reboot, to help make things easier to remember.

fformat

FFormat is a collection of utilities to manipulate files. It replaces the original file with a modified version.

Syntax 1: fformat -bclrstw[number] {filename} | {filespec}

Syntax 2: fformat({outfilename}) -bclrstw[number] {filename} | {filespec}

-l Trim spaces off the left side of each line of a file.

-t Trim spaces off the right side of each line of a file.

-c Clean non-pritable characters from each line of a file.

-s First letter of each line uppercase; the rest lower case (like a song).

-b Get rid of blank lines in a file.

-w Get rid of extra carriage returns in a file, for word processors.

-80 Make each line a maximum of 80 characters long (80 is an example). If a word is longer than the line length you specify, it will not be chopped off.

-r Recurse through subdirectories.

If you use Fformat like a function, giving a filename, it will save its results to that filename. An extension of .txt is used, if none is specified. However, if you specify a group of files with a wildcard, whatever you put in the parenthesis is the new extension, not the file name(s):

fformat(temp) -c OCRScanned.text yields temp.txt

fformat(dat) -t *.txt yields file1.txt.dat, file2.txt.dat, etc.

Until you are sure you will get what you want, you should make a copy of the original file before you run fformat on it. Since fformat manipulates files, it will destroy files, like database files, which should have a particular format. Fformat does not have an undo facility.

Function Keys

Zoom Shell allows you to map commands to function keys, so that when the Zoom Shell window is on top (when you are using Zoom Shell), you can run commands just by pressing a function key. Each of the function keys does something by default. To see what they do, type keys, or choose Options|Options from the Zoom Shell menu and click on the "Keys" tab. You can edit the key definitions there. Zoom Shell allows you to define function keys as a hot key, so that when you press a function key, Zoom Shell will run the command, regardless of whether Zoom Shell is on top.

ised

The ised command edits multiple (or single) files in a directory, replacing the file with a modified copy. This command allows you to place the search and/or replace text in files, so that you can specify carriage returns, tabs, and other characters that are difficult to handle in most text editors.

ised [-i] [-r|-d] searchtext replacetext filespec [>|>> outfile] (replace "searchtext" with "replacetext" in all files matching "filespec")

ised [-i] [-r|-d] <searchfile <replacefile filespec [>|>> outfile] (replace the contents of "searchfile" with the contents of "replacefile" in all files matching "filespec")

ised -i search replace file (case sensitive search -- the -i option is backwards, as it is for the grep command)

ised -r search replace file (recurse through subdirectories)

ised -d search replace file (descend through subdirectories)

Zoom Shell's ised is not a true stream editor. It also does not support regular expressions, as the Unix sed does. However, it does the job quickly with a minimum of fuss

lock

You may start the screen saver immediately using the lock command. This command is programed to the <F12> key by default. You have a short period of time to change your mind by moving the mouse or pressing a key. You can temporarily disable the screen saver using the nolock command (programmed to <F11>). Pressing <F12> will bring the screen saver back.

man

The man command works as follows:

man (syntax summary)

man [command] (manual for that command)

minimize

Minimize (or the alias min) works like kill, only it minimizes the window you name.

minimize inbox - microsoft exchange (minimizes exchange)

minimize -a exchange (minimizes anything with "exchange" in the title)

minimize *exchange* (minimizes anything with "exchange" in the title)

minimize *exchange (minimizes anything ending with "exchange")

minimize inbox* (minimizes anything begining with "inbox")

An asterisk ("*") in the middle does not act as a wildcard; "minimize Oracle SQL*Plus" only minimizes one window.

Minimize is useful when you set up an alias to minimize applications which you open and close frequently. I have an alias, "mm" to minimize my mail program when I am done with it.

alias mm minimize inbox - microsoft exchange

Typing mm in the Zoom Shell command window will minimize Microsoft Exchange, if you set up an alias as above.

Note: 16 bit applications do not seem to respond to minimize.

quote

quote (quote the clipboard)

quote -w (break lines at 70th character)

quote -w60 (break lines at 60th character)

quote -r (quote right hand side of clipboard)

quote "text" (quote with "text")

quote provides a way for you to quote text, internet newsgroup style, or generate batch files. To use quote, highlight the text you wish to quote and copy it to the clipboard. Then type quote in Zoom Shell and press return. The quoted text will be displayed for you in the output window, and the quoted text will also be in the clipboard, so you can paste it in your mail or news program.

If the original text was in a word processor, chances are that it will not turn out right, because there is not a hard return at the end of each line. Try quote -w to alleviate this problem.

quote -w (make each line no more than 70 characters wide)

quote -w40 (make each line no more than 40 characters wide)

You can change the default quote character, ">", to whatever character(s) you choose, by typing quote, followed by whatever characters you choose.

quote John:

quote "John: "

This will make the quote string "John:", or "John: " until you change it to something else.

quote -r will quote the right hand side of a string. You can also use quote to generate batch files or other code. You can accomplish this by putting some string on the left hand side of a list, and quote -r to put another string on the right hand side of a list.

Note: To put a space on the right or left-hand side of your quote string, enclose the string with single or double quotes.

search

search looks for text in text files, such as .html files. It is similar to grep, except:

  1. search looks for matches (and exclusions) in the entire file, instead of looking line by line.
  2. It allows for manditory, excluded, or optional words in the search criteria.

search has the following syntax:

search -ir "-excluded_word(s)" "+mandatory_word(s)" "optional_word(s)" filespec

The quotes are optional, unless

  1. you wish to search for a phrase instead of a word; or
  2. the minus sign is the first expression in the list (it would otherwise be chewed up by the options interpreter).

The -i switch makes the search case sensitive, and the -r switch makes the search recursive through subdirectories.

seek

seek looks through the path for the file you name, and switches to that directory. It is useful for finding the first copy of an EXE, DLL, etc. that the system sees.

seek notepad.exe (Zoom Shell will switch to Notepad's home directory)

sync

The sync command is used to synchronize directories. Zoom Shell's implementation of this is very simple; it matches times of all files within two directories and builds a list of commands to synchronize the two. You are given an opportunity to review and edit the list before it is run. Zoom Shell can synchronize recursively through subdirectories and perform one way synchronization. It does not transfer system files, but it does transfer hidden and read-only ones.

Example 1: (two-way synchronization, no subdirectories checked)

sync "c:\my documents" "r:\daves documents"

Example 2: (two-way synchronization, subdirectories also synchronized)

sync -r "c:\my documents" "r:\daves documents"

Example 3: (one-way synchronization from the C drive to the D drive, subdirectories also synchronized)

sync -1r "c:\my documents" "d:\my documents"

yankdir and yankpath

yankdir copies the name of the current directory into the clipboard. yankpath copies the entire path of the current directory into the clipboard. yankpath (yp) is useful for generating batch files and entering the path to a file in file/open dialogs.

Pushd and Popd

pushd is a command which works just like cd or chdir. However, the current directory is saved into a memory variable before switching directories. Issuing the popd command sets your directory back to the previous one.

(current directory is C:\Windows)

pushd c:\Program Files

(current directory is now C:\Program Files)

popd

(current directory is once again C:\Windows)

Zoom Shell stores the last 4 directories in memory, so succesive executions of popd will go back through your directory history.

By default, Zoom Shell uses cd as an alias for pushd, so that you can get the functionality of pushd without thinking about it. Also by default, Zoom Shell assigns popd to the <F3> key, so that you can press <F3> to go back through all the directories you've gone to.

INI files/Registry entries

Zoom Shell can make or get entries in INI files or the registry. Setting a value is done by the command iniset. The following examples are equivalent:

iniset "full ini file name with extension" "Section" "Key" "Value"
iniset "full ini file name with extension","Section","Key","Value"
iniset file.ini section key value
iniset "zshell.ini" "OutputWindow" "prompt" "Put on a happy face>"
iniset win.ini Desktop Wallpaper tandem.bmp

Setting the registry can be hazardous to the health of your computer, so don't do it unless you are daring or foolish. Zoom Shell has a command to help you do the unthinkable to string values in the registry:

regset "key" "value name" "value"
regset "HKEY_CURRENT_USER\Control Panel\desktop" "Wallpaper" "tandem.bmp"

You can read values in ini files and the registry with Zoom Shell. Reading is done by a function:

echo iniget("full ini file name with extension" "Section" "Key" "Default Value")
echo iniget("full ini file name with extension","Section","Key","Default Value")
echo iniget(file.ini section key default)
echo iniget("zshell.ini" "OutputWindow" "prompt" "%")
echo iniget(win.ini Desktop Wallpaper tandem.bmp)
echo regget("key" "value name")
echo regget("HKEY_CURRENT_USER\Control Panel\desktop" "Wallpaper")
echo regget(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName,ComputerName)

echo

The echo command allows you to write to the output window or to a file.

echo Hello World! (echo "Hello World!" to the output window)

echo Hello World! >test.txt (echo "Hello World!" to the file "test.txt," creating a new file)

echo Hello World! >>test.txt (echo "Hello World!" to the file "test.txt," appending to the file if it already existed)

It is also possible to write to the clipboard as if it were a file:

echo Hello World! >clipboard (echo "Hello World!" to the clipboard)

echo Hello World! >>clipboard (echo "Hello World!" to the clipboard, adding to what was already there)

It is also possible to read the clipboard as if it were a file:

echo <clipboard (echo the contents of the clipboard to the output window)

Table of Contents