Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
4OS2
Guided Tour
Published By
JP Software Inc.
P.O. Box 1470
East Arlington, MA 02174
U.S.A.
(617) 646-3975
fax (617) 646-0904
10-94
Starting The Tour
-------------------------------------------------------------------
This booklet will acquaint you with some of the features of 4DOS,
4OS2, and 4DOS/NT. It isn't a substitute for the other manuals,
but it will help you understand how familiar our products seem if
you are used to the traditional command prompt, and it will
introduce you to many of our most popular features and
enhancements. By the time you finish this guided tour, you will
have a feeling for how easy and friendly 4DOS, 4OS2, and 4DOS/NT
are compared to the traditional command processor.
Before you can start the tour, you need to install your new
command processor. If you haven't done so yet, see the
Introduction and Installation Guide for instructions. Select
"Tour Installation" from the INSTALL menu to copy the
necessary files to your disk without making any modifications
to your system configuration files. If you have already done
a full installation and 4DOS, 4OS2, or 4DOS/NT is running on
your system, just skip the step below where the command
"4DOS", "4OS2", or "4NT" is entered.
During the course of the tour, we'll ask you to enter several
commands. Your entries are shown in lower case, but you can
type in either upper or lower case.
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 1
Starting The Tour
-------------------------------------------------------------------
We've written the tour as if you were using 4DOS, because it's
our most popular product. The few minor differences in 4OS2
and 4DOS/NT are noted in the text.
C:\> cd 4dos
C:\4DOS>
C:\4DOS> 4dos
c:\4dos>
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 2
Basic Commands
-------------------------------------------------------------------
c:\4dos> exit
C:\4DOS>
Basic Commands
c:\4dos> ?
c:\4dos> dir
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 3
Basic Commands
-------------------------------------------------------------------
By using some of DIR's options, you can make the display even
easier to read. The directory display you just saw probably
didn't fit on your screen. You can tell DIR to pause at the
end of each page by using the command DIR /P. The /P is an
example of a switch or option which modifies the behavior of a
command. Enter the DIR /P command now:
c:\4dos> dir /p
You'll see the same display, but with a pause at the end of
each page.
DIR has many other formatting and file selection options; all
of them are explained under the DIR command in your Reference
Manual.
c:\4dos> tour1
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 4
Basic Commands
-------------------------------------------------------------------
The copy was performed just like the traditional COPY command,
but the output is friendlier: COPY tells you exactly what
file it copied, where it copied the file to, and a count of
files at the end.
Like COPY, the REN command tells you just what it did. You
now have two files, FILE2 and FILE3, in the current directory.
You can use another enhancement to add the extension .TST to
both of them:
Now delete the files you have just created. You could use a
simple command like DEL *.TST, but that would delete any other
.TST files in the current directory also. To protect against
erasing files that you might want to keep, add a /P option to
DEL so that it will prompt you before it deletes each file.
Answer Y to the prompts shown below to delete your test files:
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 5
Command Line Editing and History
-------------------------------------------------------------------
c:\4dos> dur /2
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 6
Command Line Editing and History
-------------------------------------------------------------------
c:\4dos> history
?
dir
... ... ...
dir /2
Now press the up-arrow key once. The last command in the
HISTORY display (DIR /2 in the example above) will appear at
the prompt. You can use the editing keys to modify this
command, which is usually much easier than retyping it. To
execute the command again, whether or not you've modified it,
press Enter. To clear the line, press Esc.
Now imagine that you have been working for a while. An hour
ago you did a complex DIR command and you need to do it again.
You could scroll through an hour's worth of command history.
But another feature called command completion will save you
time.
You can try this feature now using DI or DIR, because you've
put several DIR commands into the command history during this
tour.
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 7
Command Line Help
-------------------------------------------------------------------
You can get help for 4DOS, 4OS2, and 4DOS/NT any time you need
it from the command prompt -- just press the F1 key.
For more help using the 4DOS help system, see the Help topic
at the beginning of the topic list. If you have a mouse, see
the Mouse topic.
Now exit the help system (double click on the "close" box in
the upper left corner of the window, or use the Esc key in
4DOS). Then start entering a command:
After that "/" you want to use the option that tells COPY to
prompt you before replacing an existing file, but you can't
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 8
More About Files
-------------------------------------------------------------------
There are many more features that can help you at the command
line. Most of them are described in Chapter 3 / Using 4DOS,
4OS2, and 4DOS/NT, in your Reference Manual.
c:\4dos> tour2
TOUR2 creates three files called FILE1, FILE2, and FILE3. The
contents of the files aren't important since we're just using
them for demonstration purposes. You'll be deleting and
recreating them several times during the rest of the tour.
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 9
More About Files
-------------------------------------------------------------------
Now try the SELECT feature. SELECT lets you choose files for
any command from a full-screen list. We'll use it here to
delete one of the files that TOUR2 created. Enter the
command:
This lets you select from files that begin with the characters
"file", and pass the name of each selected file to the DEL
command for action.
Mark one or both of the files in the SELECT display, and the
marked file(s) will be copied to the floppy disk when you hit
Enter.
c:\4dos> tour2
... ... ...
Now use EXCEPT to delete all but one of the files that TOUR2
created:
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 10
More About Files
-------------------------------------------------------------------
Deleting c:\4dos\file3
2 files deleted 4,096 bytes freed
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 11
More About Files
-------------------------------------------------------------------
Directory of c:\4dos\dirb\file*.*
Note the safety feature here. When you tell DEL to delete
DIRA and DIRB, they are recognized as directory names. DEL
assumes you mean "delete all files in this directory." Since
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 12
More About Files
-------------------------------------------------------------------
4DOS, 4OS2, and 4DOS/NT also let you use file descriptions, so
you can describe a file's contents more clearly than with an
8-character file name. If you installed 4DOS from diskette,
you've seen some descriptions in your directory displays
already. The descriptions can be up to 40 characters long by
default, and may be extended up to 200 characters if you wish.
c:\4dos> tour2
c:\4dos> describe file*
Describe "c:\4dos\file1" : Tour file 1
Describe "c:\4dos\file2" : Tour file 2
Describe "c:\4dos\file3" : Tour file 3
The descriptions will appear any time you ask for a standard,
single-column directory display. They will also appear when
you use the SELECT command. They can be a lifesaver when you
have files whose contents you can't remember, or when you have
large groups of files with similar names.
4DOS, 4OS2, and 4DOS/NT can also help you find files or text
quickly and easily, anywhere on your disk. To search for
files or text, you use the FFIND command.
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 13
Directory Navigation
-------------------------------------------------------------------
c:\4dos\readme.doc
c:\4dos\updat55.doc
6 files
---- c:\4dos\appnotes.doc
[1293] echo This is junk ...
---- c:\4dos\updat55.doc
[279] immediately, without echoing the ...
3 lines in 3 files
FFIND has listed the first line in each file which contains
the text you specified. You can use the /V switch to show
every line which contains your search string (not just the
first line). The /L switch used above includes line numbers
in the output, and the /T switch specifies the search string.
Other FFIND switches let you control the order in which files
are listed, search subdirectories (like DIR /S), search the
entire hard disk, and even search all the hard disks in your
system.
Directory Navigation
c:\4dos> cd \
c:\> cd -
c:\4dos>
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 14
Aliases
-------------------------------------------------------------------
You can also change the drive and directory at the same time
with the CDD command, so you don't have to switch drives first
and then change directories. Here's an example using CDD.
Before you try it, put a floppy disk in drive A:
Now press Ctrl-PgUp (hold down the Ctrl key and then press the
PgUp key). You'll see a directory history window in the upper
right corner of your screen showing the directories you have
visited recently. You can move around this window with the
same keys you used earlier in the command history window.
When you find a directory that you want to move to, press
Enter to change to it. You can also press Ctrl-Enter to move
the directory name to the command line for editing.
Aliases
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 15
Aliases
-------------------------------------------------------------------
Here's a popular favorite for anyone who uses DIR and wants to
be able to use a simple D instead:
c:\4dos> alias
d=dir
To use the alias, just enter its name at the prompt, like any
command. In this case, you'll see a standard directory
display:
c:\4dos> d
To use this alias, just type the command D2 and press Enter.
You can pass file names to these aliases just like you would
to the original command. For example, D2 *.DOC will display
the .DOC files.
You can create aliases that are even easier to use with
keystroke aliases, which let you assign an Alt, Ctrl, or
Function key to an alias so you can invoke it by pressing a
single key. Say you'd like to assign the 2-column directory
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 16
Aliases
-------------------------------------------------------------------
display to F5. Just define an alias like D2, and make the
alias name the key name, with two at-signs [@@] before it:
Now press F5 and the DIR /2 command will be executed. You can
also create key aliases that don't execute when you press the
key, so you can type additional information on the line --
just use a single [@] sign at the start of the alias, instead
of two.
c:\4dos> dir
Alias loop
c:\4dos>
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 17
Other Commands
-------------------------------------------------------------------
Other Commands
There are a few other commands that we'll just touch on, so
that you can see some of the other capabilities of 4DOS, 4OS2,
and 4DOS/NT.
You won't see anything else happen, but you've turned logging
on. We'll return to the log later.
The FREE and MEMORY commands help you keep track of system
resources. FREE tells you about free space on your disk
drives (and is much faster than CHKDSK). MEMORY tells you
about memory resources, including available RAM, and internal
alias and history storage areas. Here are examples of the
output from our test system; try the commands on your system
and see what you get:
c:\4dos> free
Volume in drive C is JPS_TEST Serial number ...
41,826,304 bytes total disk space
23,232,512 bytes used
18,593,792 bytes free
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 18
Other Commands
-------------------------------------------------------------------
c:\4dos> memory
655,360 bytes total DOS RAM
612,256 bytes free
The TIMER command lets you time events. The following line
also shows that 4DOS, 4OS2, and 4DOS/NT can accept multiple
commands on one line. (The character used to separate
commands is a caret [^] in 4DOS, as shown below. Use an
ampersand [&] in place of the caret if you are working with
4OS2 or 4DOS/NT.) This command starts the timer, runs the
TOUR2.BTM file to create the three demonstration files,
deletes the three files, and then stops the timer and displays
the how long the whole operation took. Enter this command to
time the entire sequence on your computer:
Now return to the log that you started a few minutes ago.
Turn logging off, then take a look at what was recorded, using
these commands:
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 19
Batch Files
-------------------------------------------------------------------
You can scroll through the log with the arrow keys and PgUp /
PgDn. Press Esc to exit when you've finished viewing the log.
As you can see, the log contains every command you entered
plus a date and time stamp. It's a complete record of system
activity, including commands you type and those entered from
batch files and aliases. You can use it as a record of your
work, for security purposes, or for anything else you desire.
You may want to clean up the directory now by deleting this
demonstration log with a DEL MYLOG command.
Batch Files
You can draw boxes and lines. Enter each of these commands on
one line; use the second set if you have a monochrome
monitor:
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 20
Batch Files
-------------------------------------------------------------------
You can also ask the user for input. Try this (be sure to use
two percent signs before the second "letter"):
c:\4dos> set
COMSPEC=C:\4DOS\4DOS.COM
... ... ...
LETTER=A
The user can also type full strings if you use the INPUT
command:
Again, SET will let you view the string, stored in the
environment variable STRING. INKEY and INPUT have many
additional options, including the ability to check for valid
keystrokes, and "time out" if you don't press a key within a
specified length of time.
Once you've collected some input, you can test it with the IF
and IFF commands. Here's one example. Enter this on one line
(there's plenty of room; command lines can be up to 255
characters long in 4DOS, and up to 1023 characters in 4OS2 and
4DOS/NT). Type ampersands [&] in place of the carets [^] if
you are using 4OS2 or 4DOS/NT.
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 21
Conclusion
-------------------------------------------------------------------
Conclusion
This has been a very fast tour of some of the most popular
features of our enhanced command processors. There are many
more features, commands, and options to explore, as well as
ways to customize your system so that it suits your computing
habits and needs. One of the best features of 4DOS, 4OS2, and
4DOS/NT is their ability to adapt to your way of working
instead of requiring you to adapt to them.
-------------------------------------------------------------------
A Guided Tour of 4DOS, 4OS2, and 4DOS/NT 22
#