home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-23 | 61.3 KB | 1,366 lines |
-
-
-
-
-
-
-
-
-
- 4DOS
-
- 4OS2
-
- 4DOS for Windows NT
-
-
-
-
-
- Guided Tour
-
- for 4DOS 5.0, 4OS2 2.0, and 4DOS/NT 2.0
-
-
-
-
-
-
- Published By
-
- JP Software Inc.
- P.O. Box 1470
- East Arlington, MA 02174
- U.S.A.
-
- (617) 646-3975
- fax (617) 646-0904
-
-
-
-
-
-
-
-
-
-
-
- Copyright c 1988 - 1993, JP Software Inc., All Rights
- Reserved. 4DOS is a registered trademark and 4OS2 and JP
- Software are trademarks of JP Software Inc. Other product and
- company names are trademarks of their respective owners.
-
- 11-93
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
-
- A GUIDED TOUR OF 4DOS, 4OS2, and 4DOS/NT
-
-
- This tour will acquaint you with some of the features of 4DOS,
- 4OS2, and 4DOS/NT. It isn't a substitute for the manuals, but it
- will help you understand how familiar our products seem if you are
- used to working at the traditional command prompt. At the same
- time, 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.
-
- This tour is designed to be used interactively. Sit down at your
- computer with the manual. Each time an example is shown, try it.
- The tour will create all of the files it uses; it won't modify or
- change your existing files and subdirectories at all. Each section
- of the tour is self-contained so you can skip any sections you wish
- and return to them later.
-
- You'll need to refer to this tour documentation while you go
- through each step of the tour. To print this document, just use
- the following command:
-
- copy tour.doc prn
-
- (The file is already formatted with headers, footers, and page
- breaks, so printing it with a program that formats the pages may
- not work.)
-
-
- Starting The Tour
-
- 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.
-
- If you have a diskette copy of 4DOS, 4OS2, or 4DOS/NT, 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.
-
- If you have a downloaded copy of one of our products, just
- extract the downloaded files to a new directory on your hard
- disk, and follow the directions below.
-
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 1
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- During the course of the tour, we'll ask you to enter several
- commands. Your entries are shown here in lower case, but you
- can type in either upper or lower case.
-
- The screen displays during the tour may look slightly
- different on your system, depending on how your prompt is set
- up, what disk drive you're using, and what files are in your
- installation directory. Don't worry about any minor
- differences.
-
- In some cases, the computer's output will be too long to fit
- on a line of this manual and remain readable. We've truncated
- those lines and placed three dots [...] at the end to show you
- that the actual line displayed on your screen will be longer.
- Some commands create more lines of output than we need to
- display here to show how they work. We've put a line of nine
- dots [... ... ...] in those locations to indicate that
- additional information will be shown on your screen.
-
- 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.
-
- To start the tour, first change to the directory where 4DOS,
- 4OS2, or 4DOS/NT was installed, using the CD command. For
- example, if you've used the directory C:\4DOS, enter the
- following command:
-
- C:\> cd 4dos
- C:\4DOS>
-
- Now start 4DOS by typing:
-
- C:\4DOS> 4dos
-
- (If you are using 4OS2, type 4OS2; if you are using 4DOS/NT,
- type 4NT. If you have already performed a full installation,
- skip this step.)
-
- You'll see a sign-on message that looks similar to this:
-
- 4DOS EMS swapping initialized (128K)
- 4DOS 5.0 DOS 6.0
- Copyright 1988-1993 Rex Conn & JP Software Inc. ...
- Registered for use on a single computer.
-
- and then a prompt like this:
-
- c:\4dos>
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 2
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- Depending on how your prompt was previously defined, you may
- now see it in lower case, which many people find easier to
- read. A lower case prompt is the default, and we'll show the
- prompt that way throughout the tour. Once you have 4DOS,
- 4OS2, or 4DOS/NT fully installed you can use the PROMPT
- command to change the prompt to upper case if you prefer.
-
- If you want to exit at any time, just type the command EXIT at
- the prompt and press Enter. This will return you to the
- traditional DOS, OS/2, or Windows NT command line:
-
- c:\4dos> exit
- C:\4DOS>
-
-
- Basic Commands
-
- We'll begin the tour by demonstrating some of the most common,
- and most familiar, commands. We'll also show you some of the
- enhancements that we've added to those commands to make your
- computing easier.
-
- First, enter the single-character command ?. You'll see a
- display like this:
-
- c:\4dos> ?
- ? ALIAS ATTRIB BEEP ...
- CANCEL CD CDD CHCP ...
- COLOR COPY CTTY DATE ...
- DESCRIBE DIR DIRS DRAWBOX ...
- ... ... ...
- UNALIAS UNSET VER VERIFY ...
- Y
-
- The ? command displays a list of all the commands built into
- your new command processor. You certainly don't have to
- memorize them all -- we'll show you how to get help with any
- command in a few moments. Nor are we going to demonstrate all
- of these commands in this tour. If you want complete
- information about a command, turn to the alphabetic Command
- Reference in the Reference Manual.
-
- Now try a DIR command to see a list of files in the current
- directory. DIR displays a list of file names, sizes, dates,
- and times:
-
- c:\4dos> dir
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\*.*
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 3
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
-
- . <DIR> 8-22-91 14:21
- .. <DIR> 8-22-91 14:21
- 4dos.com 148264 11-15-93 5:00
- 4dos.doc 345005 11-15-93 5:00
- 4dos.ico 766 11-15-93 5:00
- 4dos.pif 545 11-01-93 5:00
- ... ... ...
- tour2.btm 2765 11-15-93 5:00
- update40.doc 37946 11-15-93 5:00
- vendor.doc 4434 11-15-93 5:00
- 833,056 bytes in 21 file(s) 851,968 bytes ...
- 18,651,136 bytes free
-
- The DIR display should look familiar. But, unlike the
- traditional DIR display, you'll see the file names in lower
- case and in alphabetical order. We also give you some totals
- at the end of the display that help you see how much space
- your files are using.
-
- By using some of DIR's options, you can make the display
- 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:
-
- c:\4dos> dir /p
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\*.*
-
- . <DIR> 8-22-91 14:21
- .. <DIR> 8-22-91 14:21
- 4dos.com 99280 11-01-93 5:00
- 4dos.doc 345005 11-01-93 5:00
- 4dos.ico 766 11-01-93 5:00
- 4dos.pif 545 11-01-93 5:00
- ... ... ...
- tour2.btm 2765 11-01-93 5:00
- update40.doc 37946 11-01-93 5:00
- Press any key when ready...
- vendor.doc 4434 11-01-93 5:00
- 833,056 bytes in 21 file(s) 851,968 bytes ...
- 18,649,088 bytes free
-
- You might prefer to display directories in 2 columns. DIR
- will do that if you include the /2 option. If you add the /V
- option, it will perform a vertical sort, with file names
- running alphabetically down the first column and then down the
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 4
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- second column. (We've left off the end of the second column
- of the display, since it doesn't fit on a manual page. You'll
- be able to see it on the screen.)
-
- c:\4dos> dir /2/v
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\*.*
-
- . <DIR> 8-22-91 14:21 helpcfg.exe ...
- .. <DIR> 8-22-91 14:21 kstack.com ...
- 4dos.com 99280 11-01-93 5:00 order.frm ...
- 4dos.doc 345005 11-01-93 5:00 readme.doc ...
- 4dos.ico 766 11-01-93 5:00 support.bbs ...
- 4dos.pif 545 11-01-93 5:00 sysop.doc ...
- 4dosm.ico 766 11-01-93 5:00 tour1.btm ...
- 4help.exe 45632 11-01-93 5:00 tour2.btm ...
- aliases 8164 11-01-93 5:00 update40.doc ...
- appnotes.doc 82722 11-01-93 5:00 vendor.doc ...
- 4dos.hlp 120555 11-01-93 5:00
- 833,056 bytes in 21 file(s) 851,968 bytes ...
- 18,653,184 bytes free
-
- DIR has many other formatting and file selection options.
- You'll use a few below; all of them are explained under the
- DIR command in your Reference Manual.
-
- Next, you'll use a simple batch file called TOUR1.BTM to
- create a dummy file. (A .BTM batch file is similar to a
- traditional .BAT or .CMD batch file, but faster.) To run
- TOUR1.BTM, enter the command:
-
- c:\4dos> tour1
-
- This batch file creates a small file called FILE1 in your
- current directory. The contents of the file aren't important;
- we're simply using it to demonstrate some file-handling
- capabilities. You can verify that FILE1 has been created by
- using DIR again.
-
- Now use the COPY command to copy the contents of FILE1 to a
- new file, FILE2:
-
- c:\4dos> copy file1 file2
- c:\4dos\file1 => c:\4dos\file2
- 1 file(s) copied
-
- The copy was performed just like the traditional COPY command.
- You may notice that the output is a little friendlier: COPY
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 5
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- tells you exactly what file it copied and where it copied the
- file to, along with a count of files at the end.
-
- Now try renaming a file. If you've used the traditional
- RENAME command or its synonym REN, this will look familiar:
-
- c:\4dos> ren file1 file3
- c:\4dos\file1 -> c:\4dos\file3
- 1 file(s) renamed
-
- 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:
-
- c:\4dos> ren file2 file3 *.tst
- c:\4dos\file2 -> c:\4dos\file2.tst
- c:\4dos\file3 -> c:\4dos\file3.tst
- 2 file(s) renamed
-
- Unlike the traditional REN command, our enhanced version lets
- you rename multiple files with a single command. All file
- processing commands like COPY, DEL, MOVE, and RENAME accept
- multiple file names, so you can do in one command what used to
- require a separate command for each file.
-
- 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:
-
- c:\4dos> del *.tst /p
- Delete c:\4dos\file3.tst (Y/N/R)? y
- Delete c:\4dos\file2.tst (Y/N/R)? y
- 2 file(s) deleted 4,096 bytes freed
-
- To verify all these actions, you can do a DIR or DIR /P to
- look at what files are left in the directory. All the files
- you've just created (FILE1, FILE2, FILE3, FILE2.TST, and
- FILE3.TST) should be gone.
-
- The features we've demonstrated here -- traditional commands
- with enhancements that make your work easier -- are present
- throughout 4DOS, 4OS2, and 4DOS/NT. If you want more details,
- pick a traditional command that you're familiar with and look
- up the corresponding command in the Reference Manual to get an
- idea of what's new and improved. (Remember that 4DOS, 4OS2,
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 6
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- and 4DOS/NT only replace internal commands like COPY and DIR,
- not external commands like DISKCOPY and FORMAT.)
-
-
- Command Line Editing and History
-
- This section demonstrates features which make it easy to
- correct typing mistakes at the system prompt, to repeat
- previous commands, and to get help with any command.
-
- We can't show you exact examples here as easily as we can in
- the other sections of the tour, since the display depends on
- the exact keystrokes you type and we want you to experiment a
- little. So we'll guide you through what you can do, and
- you'll see the results on your screen.
-
- First, create a typing error on purpose. Enter an incorrect
- DIR command:
-
- c:\4dos> dur /2
-
- Traditionally, you would have had to use the Backspace key to
- erase most of the line in order to correct this error, or
- press Esc and start over. Command line editing makes
- corrections much easier. Press the Home key followed by the
- right arrow. The cursor will move to the start of the line
- and then right one space to the "u" in "dur". Type an "i" and
- the command should be correct. To execute it, press Enter;
- if you'd rather not, press Esc.
-
- That's a simple example of command line editing. You can use
- the left and right arrow keys, Home and End, and Backspace and
- Del to move around and modify your command line at any time,
- just like you do in your word processor or editor. Other keys
- let you move the cursor a word at a time, delete words, change
- between overstrike and insert modes, and perform many other
- operations. Esc always clears the line and lets you start
- over. (For a summary of all the command line editing keys,
- see your Reference Manual).
-
- 4DOS and its cousins also remember the commands you type in a
- command history. We'll use the HISTORY command to display the
- commands that you have used so far during this tour:
-
- c:\4dos> history
- ?
- dir
- dir /p
- dir /2/v
- tour1
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 7
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- ren file1 file3
- ren file2 file3 *.tst
- del *.tst /p
- dir /2
-
- You are normally limited to about 1000 characters of history,
- but you can reduce or enlarge this amount to suit your own
- needs.
-
- 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 much easier than retyping it. To execute
- the command again, in either its modified or unmodified form,
- press Enter. To clear the line, press Esc.
-
- If you'd like to see more commands, first press Esc to clear
- the command line. (To see all commands in the history, you
- should always start with an empty command line.) Now press
- up-arrow several times. Each time you press it, you will back
- up one more line in the command history. Once you find the
- line you're looking for, you can modify it if you like and
- then press Enter to execute it.
-
- 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.
-
- First, type the beginning of the command -- DI, or DIR. Now
- press the up-arrow. This will recall the newest command in
- the history that starts with the characters you typed (if
- there are no matches, you'll hear a beep). Press up-arrow
- again to retrieve the command before that, still matching to
- the characters you originally typed.
-
- You can try this feature now using DI or DIR, because you've
- put several DIR commands into the command history during the
- tour.
-
- Perhaps you would prefer to look at a list of commands that
- you have entered and choose from the list. First press the
- Esc key to clear the command prompt. Then press the PgUp key.
- You will see a history window in the upper right corner of
- your screen showing the commands you've recently typed. You
- can move around in this window with the up-arrow and down-
- arrow keys. PgUp and PgDn scroll the display a page at a
- time. When you find the command you want, press Enter to re-
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 8
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- execute it as is, or press Ctrl-Enter to move the line to the
- prompt where you can edit it as usual.
-
- You can also get help any time you need it from the command
- prompt. Just press the F1 key.
-
- If you're using 4DOS, you'll see a display of all of the HELP
- topics when you press F1. If you would like some help with
- COPY, move the cursor bar to COPY, or just type COPY and 4DOS
- will move the bar for you. Press Enter to see help on the
- topic; once you're there, scroll through the help using the
- vertical arrows or PgUp and PgDn keys. The highlighted items
- within a topic are cross-references to other topics; select
- one with the horizontal arrow keys and press Enter to view it.
- Press Esc or F1 to return to the topic list.
-
- For more help using the 4DOS Help display, select the Help
- topic at the beginning of the topic list. If you have a
- mouse, see the Mouse topic near the beginning of the topic
- list.
-
- Under 4OS2, F1 will start OS/2's standard VIEW.EXE help
- program. If you aren't familiar with VIEW, click on the Help
- button on the menu bar for additional information. You can
- navigate through the help system with the mouse or keyboard,
- using standard OS/2 conventions.
-
- Under 4DOS/NT, F1 will start the standard Windows help
- program. Use the Help button on the menu bar for additional
- information. You can navigate through the help system with
- the mouse or keyboard, using standard Windows conventions.
-
- 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:
-
- c:\4dos> copy *.doc a: /
-
- After that "/" you want to use the option that tells COPY to
- prompt you before replacing an existing file, but you can't
- remember what it is. Just leave the command as it is and
- press F1. The help system will display help on the command
- you're entering, and you'll see that the option you want is
- /R. Exit the help system and you'll be right back on the
- command line. You can type the R and press Enter to execute
- your command, or press Esc instead to clear the line if you
- don't really want to execute the command.
-
-
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 9
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- There are may 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.
-
-
- More About Files
-
- This section of the tour lets you explore some additional
- features that will help you manage files and directories.
- You're about to use another batch file, TOUR2.BTM, to create
- some files with which you can experiment. First, take a look
- at the batch file with the LIST command:
-
- c:\4dos> list tour2.btm
-
- As you can see on your screen, LIST is a full screen file
- viewer. You can scroll and page through the text. You may
- notice that some lines near the end of the file extend beyond
- the edge of your screen. To make the off-screen text visible
- use the left and right arrows to scroll the display
- horizontally, or press W to turn line wrapping on and off.
- LIST also lets you search for text and print the file you're
- viewing, two capabilities that we won't demonstrate on this
- tour. The file TOUR2.BTM is simply a batch file that creates
- other files, using the ECHO command. You don't have to worry
- about how it works; we just used it to show you LIST. Press
- Esc to exit List and return to the command line.
-
- Now run TOUR2.BTM:
-
- c:\4dos> tour2
-
- Please wait ...
-
- File creation completed
-
- 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.
-
- Now try the SELECT feature. SELECT lets you choose files for
- any 4DOS, 4OS2, or 4DOS/NT command from a full-screen list.
- We'll use it here to delete one of the files that TOUR2
- created. Enter the command:
-
- c:\4dos> select del (file*)
-
-
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 10
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- This command lets you select from files that begin with the
- characters "file", and then pass the name of each file you
- select to the DEL command for action.
-
- The display on your screen includes a two-line header and then
- the list of files, just as they'd look in a directory display.
- Press the spacebar to "mark" the first file -- a triangular
- mark will appear to the left of the file name. You can scroll
- around in the display and mark and unmark files with the
- spacebar as you like. When you hit Enter, the command will be
- executed, deleting the files you've marked. For now, mark
- FILE1 and leave the other files unmarked, so that FILE2 and
- FILE3 are not deleted. You'll use them in the next step.
-
- SELECT is also handy if you want to copy a group of files to a
- floppy disk, perhaps to take your work home for the night or
- to make a quick backup. If you'd like to try it, put a blank,
- formatted floppy disk in drive A. Then enter this command:
-
- c:\4dos> select copy (file*) a:
-
- Mark one or both of the files in the SELECT display, and the
- marked files will be copied to the floppy disk when you hit
- Enter.
-
- SELECT is a "prefix" command: it goes before another command
- and modifies what that second command does. Another useful
- prefix command is EXCEPT, which lets you do something except
- to one or more files. Before you try EXCEPT, create new
- copies of FILE1, FILE2, and FILE3 (TOUR2 will overwrite any
- old copies of these files remaining from the last time it was
- run):
-
- c:\4dos> tour2
-
- Please wait ...
-
- File creation completed
-
- Now use EXCEPT to delete all but one of the files that TOUR2
- created:
-
- c:\4dos> except (file1) del file*
- Deleting c:\4dos\file2
- Deleting c:\4dos\file3
- 2 file(s) deleted 4,096 bytes freed
-
- The EXCEPT command protected FILE1 from being deleted. To
- verify that, use the DIR command. When you're done, run TOUR2
- one more time so the files are there for the next step.
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 11
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- Next, create two subdirectories within the current directory:
-
- c:\4dos> md dira dirb
-
- Notice that you can create both subdirectories with a single
- command. Traditionally, you would have needed two MD commands
- to do the same thing. To verify that the directories are
- there, use DIR but ask it to display only subdirectories and
- not files (if you're curious, /A:D stands for "Attributes:
- Directory"):
-
- c:\4dos> dir /a:d
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\*.*
-
- . <DIR> 8-22-91 14:21
- .. <DIR> 8-22-91 14:21
- DIRA <DIR> 11-03-93 10:23
- DIRB <DIR> 11-03-93 10:23
- 0 bytes in 4 file(s) 0 bytes allocated
- 18,608,128 bytes free
-
- OK, things look right. Now move the demonstration files to
- those directories, using the built-in MOVE command. This is
- what you should type to move FILE1 to DIRA, and FILE2 and
- FILE3 to DIRB:
-
- c:\4dos> move file1 dira
- c:\4dos\file1 -> c:\4dos\dira\file1
- 1 file(s) moved
-
- c:\4dos> move file2 file3 dirb
- c:\4dos\file2 -> c:\4dos\dirb\file2
- c:\4dos\file3 -> c:\4dos\dirb\file3
- 2 file(s) moved
-
- As usual, you can see exactly what has happened.
-
- Now that you've created a subdirectory structure, it's time to
- get a comprehensive look at it. Use DIR to look for all the
- files whose names begin with "file" in the current directory
- and all of its subdirectories -- that's the DIR /S option:
-
- c:\4dos> dir /s file*
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\dira\file*.*
-
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 12
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- file1 22 11-03-93 10:37
- 22 bytes in 1 file(s) 2,048 bytes allocated
- 18,587,648 bytes free
-
- Total for: c:\4dos\dira\file*.*
- 22 bytes in 1 file(s) 2,048 bytes allocated
-
- Directory of c:\4dos\dirb\file*.*
-
- file2 22 11-03-93 10:37
- file3 1938 11-03-93 10:37
- 1,960 bytes in 2 file(s) 4,096 bytes allocated
- 18,587,648 bytes free
-
- Total for: c:\4dos\dirb\file*.*
- 1,960 bytes in 2 file(s) 4,096 bytes allocated
-
- Total for: c:\4dos\file*.*
- 1,982 bytes in 3 file(s) 6,144 bytes allocated
-
- DIR has displayed the directory header, filenames, and totals
- for each of the two subdirectories that contain files matching
- the name you entered, FILE*. It also has displayed a grand
- total.
-
- You've seen that DIR can look at several subdirectories at
- once. Now do the same thing with DEL, and delete the files
- you put in your demonstration subdirectories, along with the
- subdirectories themselves, with a single command. To do so,
- you need to use two options: /S and /X. The first option
- tells DEL to delete files in the current directory and all of
- its subdirectories. The /X option makes DEL remove each
- subdirectory if all the files within it are deleted:
-
- c:\4dos> del /s/x dira dirb
- c:\4dos\dira\*.* : Are you sure (Y/N/R)? Y
- Deleting c:\4dos\dira\file1
- c:\4dos\dirb\*.* : Are you sure (Y/N/R)? Y
- Deleting c:\4dos\dirb\file2
- Deleting c:\4dos\dirb\file3
- 3 file(s) deleted 6,144 bytes freed
-
- 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
- you're deleting all the files, DEL displays a prompt that
- tells you what's about to be deleted and asks you whether you
- really want to do the deletion. Once you answer Y, the files
- are deleted and the subdirectory is automatically removed
- because you used the /X switch.
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 13
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- 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. The descriptions can be up to 40
- characters long by default, and may be extended up to 200
- characters if you wish..
-
- First, run TOUR2 again to regenerate the three demonstration
- files. Then use the DESCRIBE command to create a description
- for each file (you can enter any description you like; you
- don't have to use the text shown):
-
- 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
-
- Now look at the descriptions with a DIR command:
-
- c:\4dos> dir file*
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\file*.*
-
- file1 22 11-03-93 10:48 Tour file 1
- file2 22 11-03-93 10:48 Tour file 2
- file3 1938 11-03-93 10:49 Tour file 3
- 1,982 bytes in 3 file(s) 6,144 bytes allocated
- 18,604,032 bytes free
-
- 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.
-
-
- Directory Navigation
-
- 4DOS, 4OS2, and 4DOS/NT don't just make it easier to access
- files; they also make your life much easier when you're
- navigating through the hard disk directory structure. You're
- probably already familiar with the traditional CD command,
- which you use to change directories. We've added a "go back"
- option to CD, which is invoked by using the minus sign [-]
- instead of a directory name. Try this:
-
- c:\4dos> cd \
- c:\> cd -
- c:\4dos>
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 14
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- The CD - changes back to the directory you were in before the
- most recent CD command. It's a convenient way to switch back
- and forth between two directories. (Make sure you type at
- least one space between CD and the minus sign.)
-
- 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:
-
- c:\4dos> cdd a:\
- a:\> cdd -
- c:\4dos>
-
- As you can see, the minus works with CDD as well.
-
- For more complex sequences of directory navigation, you can
- use PUSHD and POPD. These commands maintain a directory
- "stack" and let you make several changes, then move back
- through the directories you've been to. They can change both
- drive and directory, like CDD. For example:
-
- c:\4dos> pushd a:\
- a:\> pushd c:\
- c:\> popd
- a:\> popd
- c:\4dos>
-
- 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 as you used in the history window, earlier. 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.
-
- We also offer you a special environment variable, CDPATH, to
- help you find the right directory without a lot of typing.
- CD, CDD, and PUSHD use CDPATH to find the subdirectory you
- want to change to if they can't find it in the current
- directory. This can help a lot when you have long but
- commonly used directory names. For example, say you have a
- directory called C:\DBASE\REPORTS which contains a
- subdirectory for each month of the year. If you set CDPATH
- like this:
-
- c:\4dos> set cdpath=c:\dbase\reports
-
- Then you can change to the JANUARY subdirectory like this:
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 15
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- c:\4dos> cd january
- c:\dbase\reports\january> cd -
- c:\4dos>
-
- CD found the JANUARY subdirectory, saving you from typing the
- entire name, because its parent directory was listed in
- CDPATH.
-
-
- Aliases
-
- Aliases are one of the most powerful features in 4DOS, 4OS2,
- and 4DOS/NT. Simple aliases are very easy to set up and use
- (that's what we'll discuss here). Complex aliases allow you
- to configure your system just about any way you want, and can
- take the place of many small batch files.
-
- The purpose of an alias is to rename or reconfigure a command.
- Aliases are defined and viewed with the ALIAS command. In
- this tour, we'll show you how to set up aliases for the DIR
- command. Of course, you can use aliases to enhance any
- command; for more examples see the ALIAS command in the
- Reference Manual, and the sample file ALIASES that comes with
- your product.
-
- 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 see what aliases you've defined, enter ALIAS with no
- parameters:
-
- c:\4dos> alias
- d=dir
-
- To use the alias, just enter its name at the prompt, like any
- command:
-
- c:\4dos> d
-
- Volume in drive C is JPS_TEST Serial number is ...
- Directory of c:\4dos\*.*
-
- . <DIR> 8-22-91 14:21
- .. <DIR> 8-22-91 14:21
- 4dos.com 99280 11-01-93 5:00
- 4dos.doc 345005 11-01-93 5:00
- 4dos.ico 766 11-01-93 5:00
- 4dos.pif 545 11-01-93 5:00
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 16
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- ... .......
- tour2.btm 2765 11-01-93 5:00
- update40.doc 37946 11-01-93 5:00
- vendor.doc 4434 11-01-93 5:00
- 835,038 bytes in 24 file(s) 858,112 bytes ...
- 18,599,936 bytes free
-
- Once you've defined an alias, you can use it anywhere a
- command can be used: at the command prompt, in a batch file,
- or inside another alias.
-
- As an example, build on the D alias you have already defined.
- Suppose you regularly use 2-column directory listings,
- discussed near the start of the tour. Each time you want a
- directory listing, you use the command DIR /2. Define an
- alias, D2, to let you execute this command with the touch of a
- couple of keys. Since you have already defined D, you can
- define D2 in either of these ways (choose one to try):
-
- c:\4dos> alias d2 = dir /2
- c:\4dos> alias d2 = d /2
-
- If you want to see the results, just enter ALIAS again:
-
- c:\4dos> alias
- d=dir
- d2=d /2
-
- 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 give you
- a 2-column display of the .DOC files.
-
- You can create aliases that are even easier to use with
- keystroke aliases. These aliases let you assign an Alt 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
- display to F5. Just define an alias like D2 above, and make
- the alias name the key name, with an at-sign [@] before it:
-
- c:\4dos> alias @f5 = dir /2
-
- Now press F5 and the DIR /2 command will appear on the command
- line. Press Enter to execute it, or type some additional
- arguments and then press Enter if you'd like. (You can also
- make key aliases execute as soon as you press the key. For
- details on how, see the Reference Manual)
-
- You can use an alias to redefine how a standard command works,
- without changing its name. Suppose you always want DIR to
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 17
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- display its output in 2 columns, with a vertical sort and a
- pause at the end of each page. You might think of using
- something like this:
-
- c:\4dos> alias dir = dir /2/p/v
-
- Go ahead and try that, then do a DIR. You'll get an error:
-
- c:\4dos> dir
- Alias loop
- c:\4dos>
-
- The "alias loop" error is caused because the DIR command
- inside your alias is interpreted as another attempt to run the
- same alias. It's easy to change the alias so this doesn't
- happen:
-
- c:\4dos> alias dir = *dir /2/p/v
-
- The [*] indicates that what follows is not an alias. Try the
- definition above (you can scroll back to the incorrect
- definition with up-arrow and modify it). Then do a DIR and
- you'll see the results. Using this method, you can redefine
- the default options for any internal command.
-
- Aliases can contain multiple commands and can do much fancier
- things than what you've seen here. They're great for creating
- shorthand names for commonly used programs like your word
- processor or database, and they will often help get programs
- loaded faster as well -- if you put the full name of the
- program in an alias, there's no need to search your PATH for
- it.
-
-
- 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.
-
- First, turn on the LOG facility, which records all the
- commands you enter. Enter the command:
-
- c:\4dos> log /w mylog
-
- You won't see anything else happen, but you've turned logging
- on. We'll return to the log later.
-
- A couple of commands let you control screen color. The
- examples here will work on any system with a color video board
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 18
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- (the commands work on monochrome systems, too, but you're
- restricted to the colors white and black). Try clearing the
- screen to a specific color:
-
- c:\4dos> cls bright white on magenta
-
- Now let's set a different color:
-
- c:\4dos> color bright yellow on blue
-
- The behavior of the COLOR command varies depending on which
- product you are using. Under 4DOS, if you don't have an ANSI
- driver loaded COLOR will change the color of the entire screen
- immediately. If you do have an ANSI driver loaded, COLOR only
- affects the color of text displayed after it's executed, and
- not the color of text already on the screen. If you don't
- know, don't worry about it -- just experiment with COLOR and
- see.
-
- Under 4OS2 COLOR affects the color of text displayed after
- it's executed, but won't change the screen color immediately.
- Under 4DOS/NT, COLOR will change the color of the text on the
- screen, and the color of subsequent output as well.
-
- 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 expanded and extended memory
- 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 values you get.
-
- c:\4dos> free
- Volume in drive C is JPS_TEST Serial number is ...
- 41,826,304 bytes total disk space
- 23,232,512 bytes used
- 18,593,792 bytes free
-
- c:\4dos> memory
- 655,360 bytes total DOS RAM
- 612,256 bytes free
-
- 7,815,168 bytes total EMS memory
- 688,128 bytes free
-
- 12,288 bytes free XMS memory (HMA in use)
-
- 1,792 bytes total environment
- 233 bytes free
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 19
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- 6,144 bytes total alias
- 1,045 bytes free
-
- 1,024 bytes total history
-
- 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. (As shown below, the standard command
- separator is a caret [^] in 4DOS. Use an ampersand [&] in
- 4OS2 and 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 time the whole operation took. Enter this command to time
- the entire sequence on your computer:
-
- c:\4dos> timer ^ tour2 ^ del file1 file2 file3 ^ timer
- Timer 1 on: 11:10:01
-
- Please wait ...
-
- File creation completed
- Deleting c:\4dos\file1
- Deleting c:\4dos\file2
- Deleting c:\4dos\file3
- 3 file(s) deleted
- Timer 1 off: 11:10:06 elapsed: 0:00:05.11
-
- Now return to the log that you started a few minutes ago.
- Turn logging off, then take a look at what was recorded.
- Enter the following two commands:
-
- c:\4dos> log off
- c:\4dos> list mylog
-
- You'll see a full-screen display of the log file. It should
- look something like this:
-
- [11-03-93 11:05:02] cls bright white on magenta
- [11-03-93 11:05:54] color bright yellow on blue
- [11-03-93 11:07:08] free
- [11-03-93 11:07:49] memory
- [11-03-93 11:09:55] timer
- [11-03-93 11:09:56] tour2
- ... (commands from TOUR2.BTM will be displayed here)
- [11-03-93 11:10:00] del file1 file2 file3
- [11-03-93 11:10:01] timer
- [11-03-93 11:12:35] log off
-
- You can scroll through the log with the arrow keys and PgUp /
- PgDn. Press Esc to exit when you've finished viewing the log.
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 20
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- 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 Programming
-
- This final section demonstrates a very few of the enhancements
- we offer for your batch files. If you've never worked with
- batch files, you may want to skip this section. If you aren't
- sure, give it a try and stop if things seem too complex. You
- don't have to be a batch file expert to use 4DOS, 4OS2, or
- 4DOS/NT.
-
- Rather than having you go to the trouble of writing actual
- batch files, we'll demonstrate some of the batch file features
- that work just as well at the prompt.
-
- Some batch file improvements aid in communicating with the
- user. You can make sounds:
-
- c:\4dos> beep 440 2 880 8 660 4
-
- You can draw boxes and lines. Enter each of these commands on
- one line; use the second set of commands if you have a
- monochrome monitor:
-
- c:\4dos> cls bright white on blue
- c:\4dos> drawbox 10 10 20 70 4 bright cyan on black
- fill black
- c:\4dos> drawhline 15 10 61 1 bright cyan on black
-
- c:\4dos> cls bright white on black
- c:\4dos> drawbox 10 10 20 70 4 black on white fill
- white
- c:\4dos> drawhline 15 10 61 1 black on white
-
- Notice that these commands correctly connect the lines on the
- screen where they intersect. Additional commands like SCREEN
- and SCRPUT, which we won't demonstrate here, display text
- anywhere on the screen and in any color.
-
- You can also ask the user for input. Try this (be sure to use
- two percent signs before the second "letter"):
-
- c:\4dos> inkey Enter a letter: %%letter
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 21
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- Enter a letter: A
-
- The letter you typed was stored in your environment in the
- variable named LETTER. Use the SET command to view it:
-
- c:\4dos> set
- COMSPEC=C:\4DOS\4DOS.COM
- ... ... ...
- LETTER=A
-
- The user can also type full strings if you use the INPUT
- command:
-
- c:\4dos> input Enter a string: %%string
- Enter a string: Type anything you like here ...
-
- Again, SET will let you view the string, stored in the
- environment variable STRING.
-
- Once you've collected some input, you will probably want to
- 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). Note that two percent signs
- are used in the INKEY command and one is used in the IFF, and
- that a double equal sign is used in the IFF statement. Type
- ampersands [&] in place of the carets [^] if you are using
- 4OS2 or 4DOS/NT.
-
- c:\4dos> inkey Enter a letter: %%letter ^
- iff "%letter"=="A" then ^ echo hi ^ else ^
- echo bye ^ endiff
-
- Try using the up-arrow to repeat the command several times,
- giving different responses to the "Enter a letter" prompt.
-
- 4DOS, 4OS2, and 4DOS/NT offer dozens of additional batch file
- improvements. For more information see the Reference Manual.
-
-
- 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.
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 22
-
- A Guided Tour Of 4DOS, 4OS2, and 4DOS/NT
- -------------------------------------------------------------------
-
- If you selected "Tour Installation" when you ran the INSTALL
- program, you will probably want to perform a full installation
- now. You can put the distribution disk in your floppy drive,
- run INSTALL, and follow the instructions on the screen. If
- you need help, refer to the installation instructions in your
- Introduction and Installation Guide.
-
- To learn more about specific commands, look through the
- Command Reference section of the Reference Manual or online
- hellp. To learn more about the dozens of features that aren't
- related to specific commands, read through Chapter 2 / Using
- 4DOS, 4OS2, and 4DOS/NT in the Reference Manual, or the topics
- at the beginning of the online help (before the command list).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------------------------------------------------
- Copyright 1993, JP Software Inc. 23
-