w555.com 4DOS 6.00 Usage Examples
The operating systems on microcomputers all come with a command interpreter (Command Interpreter), that is, a shell (Shell), used to carry out some basic operations. Under DOS and Windows 95 there is command.com, and under OS/2 and Windows NT it is cmd.exe. They are usually used by displaying a prompt on the screen (such as C:\> changing to C:\]), ready to accept commands, and then interpreting and executing the commands typed by the user. These original shells have limited functions, and their interfaces are not friendly enough; I suppose the manufacturers all put their focus on Windows. The shareware 4DOS is an improved shell, very powerful and much loved by users, and it can replace command.com in various DOS systems; among its features, many new options and switches have been added to some old commands, and users familiar with Unix commands will surely find it especially congenial. 4DOS is easy to install. Its main file, 4dos.com, is about 219K and uses 4K of conventional memory; if you first edit the file 4dos.ini, make use of the upper memory block UMB, and then install it with LH 4dos.com, it will use 3600 bytes of UMB and 272 bytes of conventional memory. After installing 4DOS, new users need not rush to delete the old command.com; they can coexist, and the old commands can still be used.
4DOS version 5.95 is included in the second issue of the "Computer News Companion CD," and version 6.00 is in the third issue. Below are some examples illustrating a few interesting functions of 4DOS.
Example 1 C:\>beep 262 18 294 36 330 54 You can use beep to compose simple tunes. In this example it will play do for one second, re for two seconds, and mi for three seconds.
Example 2 C:\>color bright blink red on green border yellow The screen changes to a blinking red foreground, green background, and yellow border.
Example 3 C:\>set colordir= com exe:red;doc txt:gre;zip:yel After this example is executed, the dir command becomes colorized. Filenames with the extensions com and exe become red, those with doc and txt become green, and those with zip become yellow.
Example 4 C:\>copy/[d-2,+0]/[s2000,10000] d:\data\*.* a:\ Copy all files created two days ago in the data directory on drive D, with lengths between 2000 and 10000 bytes, into the root directory of drive A in one go. The copy command has eighteen options, and its functions are even stronger than the three commands copy.xcopy.diskcopy in MSDOS 622 combined.
Example 5 A:\>del [!*.txt *.doc] *.* Delete all other files on drive A except those whose extensions are txt and doc. The file exclusion ranges function is used here, and most internal commands that accept wildcards (*) (such as dir and copy) can also use file exclusion ranges.
Example 6 C:\>list.txt The file .txt is opened for reading. You can scroll up and down line by line or page by page, which is very convenient. After finishing reading, press the Esc key to close the file and return to the command line.
Example 7 C:\>ren/s dos dos6.22 The directory dos is renamed dos6.22.
Example 8
C:\>hhistory Displays a list of recently executed commands, that is, the command history. In addition, you can press PgUp or PgDn at any time to pop up the command history window, and then use the up and down arrow keys to select the command you want to execute.
Example 9
C:\>dirhistory Displays a list of recently switched working directories, that is, the directory history. In addition, you can press the key combination Ctrl-PgUp or Ctrl-PgDn at any time to pop up the directory history, and then use the up and down arrow keys to select the directory you want to switch to.
Example 10 C:\>ffind /t"abcd" *.txt Search for the string abcd in text mode in all files with the txt extension in the current directory. If you execute ffind /x"61 62 63 64" *.txt, the effect is the same; here /x means hexadecimal mode is used.
Example 11 C:\>memory Lists some information about system memory.
Example 12
C:\>reboot Warm-boots the machine again, equivalent to pressing the key combination Ctrl-Alt-Del. If you want a cold boot, use reboot/c. If you use the /v option, the user is asked to type Y or N to confirm.
Example 13 C:\>vscrput 5 15 red on gre Hello! Vertically displays the text Hello! in red on a green background starting at row 5, column 15.
Example 14 C:\>exit Exit 4DOS and return to the DOS interface.
The above only shows a tiny bit of 4DOS's functionality. After installation, pressing the F1 key will bring up the online help file. This file is excellent, about 723K long, and contains detailed explanations of all commands and related issues.
(Hunan, Yang Bizhong)
The operating systems on microcomputers all come with a command interpreter (Command Interpreter), that is, a shell (Shell), used to carry out some basic operations. Under DOS and Windows 95 there is command.com, and under OS/2 and Windows NT it is cmd.exe. They are usually used by displaying a prompt on the screen (such as C:\> changing to C:\]), ready to accept commands, and then interpreting and executing the commands typed by the user. These original shells have limited functions, and their interfaces are not friendly enough; I suppose the manufacturers all put their focus on Windows. The shareware 4DOS is an improved shell, very powerful and much loved by users, and it can replace command.com in various DOS systems; among its features, many new options and switches have been added to some old commands, and users familiar with Unix commands will surely find it especially congenial. 4DOS is easy to install. Its main file, 4dos.com, is about 219K and uses 4K of conventional memory; if you first edit the file 4dos.ini, make use of the upper memory block UMB, and then install it with LH 4dos.com, it will use 3600 bytes of UMB and 272 bytes of conventional memory. After installing 4DOS, new users need not rush to delete the old command.com; they can coexist, and the old commands can still be used.
4DOS version 5.95 is included in the second issue of the "Computer News Companion CD," and version 6.00 is in the third issue. Below are some examples illustrating a few interesting functions of 4DOS.
Example 1 C:\>beep 262 18 294 36 330 54 You can use beep to compose simple tunes. In this example it will play do for one second, re for two seconds, and mi for three seconds.
Example 2 C:\>color bright blink red on green border yellow The screen changes to a blinking red foreground, green background, and yellow border.
Example 3 C:\>set colordir= com exe:red;doc txt:gre;zip:yel After this example is executed, the dir command becomes colorized. Filenames with the extensions com and exe become red, those with doc and txt become green, and those with zip become yellow.
Example 4 C:\>copy/[d-2,+0]/[s2000,10000] d:\data\*.* a:\ Copy all files created two days ago in the data directory on drive D, with lengths between 2000 and 10000 bytes, into the root directory of drive A in one go. The copy command has eighteen options, and its functions are even stronger than the three commands copy.xcopy.diskcopy in MSDOS 622 combined.
Example 5 A:\>del [!*.txt *.doc] *.* Delete all other files on drive A except those whose extensions are txt and doc. The file exclusion ranges function is used here, and most internal commands that accept wildcards (*) (such as dir and copy) can also use file exclusion ranges.
Example 6 C:\>list.txt The file .txt is opened for reading. You can scroll up and down line by line or page by page, which is very convenient. After finishing reading, press the Esc key to close the file and return to the command line.
Example 7 C:\>ren/s dos dos6.22 The directory dos is renamed dos6.22.
Example 8
C:\>hhistory Displays a list of recently executed commands, that is, the command history. In addition, you can press PgUp or PgDn at any time to pop up the command history window, and then use the up and down arrow keys to select the command you want to execute.
Example 9
C:\>dirhistory Displays a list of recently switched working directories, that is, the directory history. In addition, you can press the key combination Ctrl-PgUp or Ctrl-PgDn at any time to pop up the directory history, and then use the up and down arrow keys to select the directory you want to switch to.
Example 10 C:\>ffind /t"abcd" *.txt Search for the string abcd in text mode in all files with the txt extension in the current directory. If you execute ffind /x"61 62 63 64" *.txt, the effect is the same; here /x means hexadecimal mode is used.
Example 11 C:\>memory Lists some information about system memory.
Example 12
C:\>reboot Warm-boots the machine again, equivalent to pressing the key combination Ctrl-Alt-Del. If you want a cold boot, use reboot/c. If you use the /v option, the user is asked to type Y or N to confirm.
Example 13 C:\>vscrput 5 15 red on gre Hello! Vertically displays the text Hello! in red on a green background starting at row 5, column 15.
Example 14 C:\>exit Exit 4DOS and return to the DOS interface.
The above only shows a tiny bit of 4DOS's functionality. After installation, pressing the F1 key will bring up the online help file. This file is excellent, about 723K long, and contains detailed explanations of all commands and related issues.
(Hunan, Yang Bizhong)
欢迎大家观临我的个人主页:
http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/
EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/
EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
