China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 09:43
中国DOS联盟论坛 » 站务公告 & 版主讨论 » Part of the basic DOS material I organized [to be revised] View 5,691 Replies 22
Original Poster Posted 2003-08-09 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Over the past few days I discussed it with Wengier, DD and others, and we decided to organize the forum's featured posts, basic knowledge, and similar content into more systematic knowledge. First, this will reduce the burden on the moderators; second, it will make it easier for forum members to look things up; third, it will prepare materials for the future CDU main site.
My own level is pretty newbie, and I just happen to have some time recently, so I'll start by organizing some basic material first.
But precisely because my technical level is weak, the materials I put together definitely have many places that need improvement. So now I'm posting these materials here, and asking all moderators and enthusiastic members to take a good look, and offer more opinions and suggestions, so we can develop together with CDU.

Chapter 1 Why learn DOS


1. What is DOS?
DOS is the English abbreviation of Disk Operating System, meaning disk operating system. In the general sense, DOS refers to the command-line mode of early operating systems. It played a very important role in the development of PC computers, and once almost ruled the world, with many users and enthusiasts around the globe. There are also many versions of DOS, such as PC-DOS, DR-DOS, ROM-DOS, FreeDOS, MS-DOS, etc., among which the most commonly used is MS-DOS. The most practical is MS-DOS 7.10.

2. What is an operating system?
If you plan to build a house for yourself, you do not need to personally understand bricks, timber, paint, and other building materials, nor do you need to hire carpenters, masons, plumbers, and other workers yourself. The construction company will take care of all that for you. You only need to put forward your own ideas about the house layout and decorating style, and the workers will come to the site every day and work in an orderly way using the available materials. That is the credit of the construction company. In the same way, you can think of DOS as a contractor like a construction company, and hand similar matters over to it for management.
If you install an operating system on a computer, it can:
1. Manage and control hardware
For example, the letters you type on the keyboard naturally appear on the screen; speakers or headphones can play pleasant songs; computers can communicate through network cards and cables...
2. Help you communicate with the computer
It can make the computer execute your commands; it can display the computer's feedback messages on the screen...
3. Save information and find it again when you need it
4. Provide a stable running platform for other software, and manage them
5. ...

In short, the operating system has greatly liberated productivity. It lets us use computers without needing to understand profound computer knowledge, and enables our work efficiency to improve dozens or even hundreds of times over.

In fact, from this point of view, the Windows series, UNIX\Linux, and so on are all operating systems, and some are far more advanced than command-line DOS.

3. Why learn DOS?
Since there are so many operating systems more advanced than DOS, why still learn DOS?
1. First of all, please note that the DOS we are talking about now refers to the DOS of the new era, not the earlier PC-DOS, MS-DOS, and so on. The DOS of the new era represents freedom, openness, and development! It can develop together with and mutually promote other operating systems such as Windows and Linux, while each has its own important value for existing. That is the most wonderful situation.
2. The Windows series has made the DOS world even richer. It is a graphical operating environment running under the DOS operating system. Therefore, DOS is a powerful, practical, and stable operating system! Under DOS you can use command-line operations, and you can also enter GUI programs such as WIN to work in graphical mode. After a Windows system crashes, you can use it for system repair. Everything Windows can do can be achieved in DOS. It is closer to the underlying layer, and learning DOS can help you understand Windows and computers better.
3. DOS already has many years of history. Its programs and learning materials are easier to obtain than Unix/Linux, and in the industry DOS has the best compatibility. It has low system requirements and the widest range of applications. Also, compared with Unix/Linux, it is simple, compact, and easy to learn and use.


4. DOS development prospects
DOS has been continuously developing ever since it was born. The commonly used Windows9x now is actually just a large protected-mode software under DOS, which means MS-DOS is still developing, not to mention the many other DOS versions (such as PC-DOS, DR-DOS, ROM-DOS, FreeDOS...).
Up to now, DOS can already support Chinese long file names, large hard disks, USB drives, NTFS partitions... Right now, we are even thinking of adding a GUI graphical interface to DOS...
In this new DOS era, on a worldwide scale, a large amount of new DOS software is constantly being developed, and new compilers and programming libraries are also continually appearing. Together with the push from the "open source movement," DOS has entered an era of free development. As it continues developing, its influence grows greater and greater, more and more people are participating, and its value and significance are beyond estimation!



艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 2 Posted 2003-08-09 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Computer Basics

Hehe, this piece is for basic popularization. Basically I don't plan to write it too complicated, and I may not necessarily use very professional language to describe things. My goal is to explain clearly what I'm talking about in as simple language as possible, and also simplify the topics we're going to deal with a bit, so that you can understand them as quickly as possible. Some of the knowledge I mention may already be outdated, or not quite consistent with today's newer technology, but please believe me: the content below will be very helpful for your future learning in computers.
Now, let's begin!

1. The hardware components of a computer
In fact, from the physical side, a computer is made up of only a few parts. To put it this way, CPU, motherboard, memory, graphics card, hard disk, monitor, and so on—assembled together in the right way—make up a usable computer. To put it even more simply, for newbies like us, a computer, a normal usable computer, can also be thought of as including just these parts: monitor, keyboard and mouse, speakers, and most importantly the main unit—that square box where you press the button every time you turn it on, and that has lots of cables connected at the back.
So for us, in such a computer, which parts are the ones we often need to use and thoroughly understand? Take note, the commonly used parts are as follows:
1. Used to input data: keyboard, mouse
2. Used to boot the system (start the computer): hard disk, floppy disk drive (floppy drive), and CD-ROM drive (optical drive). Of course, USB flash drives also work now. There is also booting through the network, but that belongs to diskless workstations or terminal networks, which is not what we are going to talk about here, so we'll skip it.
Some readers may wonder why the items listed above are not quite the same. For example, the floppy drive and CD-ROM drive both contain the word "drive," while the hard disk and USB disk are not called "hard drive" or "USB drive" here, and I've also heard of floppy disks and CD-ROMs—what is going on? Actually, it's like this: we know that whether floppy disk, hard disk, or USB disk, they are all used to store data. Then naturally some devices are needed to read and write them so they can be used by us. These devices are what we call drives. Some devices, such as hard disks, are manufactured under very strict conditions, and there cannot be even a tiny bit of dust inside them, so they must be sealed. Then how can the hard disk drive operate on the sealed hard disk? The method is to enclose the hard disk drive and the hard disk platters together in one sealed unit, abbreviated as hard disk. The USB disk is similar as well. The working principles of floppy disks and optical discs are different, so what we see now are separate floppy drives and floppy disks, separate CD-ROM drives and CDs.
But those floppy disks and hard disks cannot boot a system from the start. If they are to boot a system, then an operating system must be installed on them.
3. Used to feed back computer messages: the monitor. If we enter the correct command, the monitor will show the result of executing the command; if the command entered is wrong, an error prompt will appear on the screen. A printer is also an output device, but let's not deal with it for now.

2. Some concepts related to the operating system
From the introduction in the article "Why Learn DOS," everyone should already know the benefits of installing an operating system on a computer. So what basic knowledge does an operating system involve? Below, I'll explain it in detail for everyone.

1. Partition
A partition is a data storage area divided out on the hard disk. It and the hard disk are two completely different concepts. There are several types such as primary partition, extended partition, and logical partition. Among them, the primary partition serves to boot the system, and the operating system is installed on it. On a hard disk, aside from the primary partition, all the remaining space can be divided into the extended partition, while logical partitions are contained within the extended partition. There may be several primary partitions on one hard disk, but only one primary partition can be in effect. In addition, the active primary partition and the extended partition can be seen and operated on in the operating system, while the extended partition itself can only be imagined in our minds, or seen in its true form when carrying out partitioning operations.
There are many reasons for dividing partitions. For example, early operating systems had limits on partition size; or you might divide the hard disk into several areas, one for games, one for study materials; or for some private reasons, and so on.
2. Drive letters
If you have used a computer, I'm sure terms like drive A and drive C are familiar to you. In fact, these so-called drive letters are simply the labels assigned by the system to storage devices such as floppy disks, hard disks, USB disks, and CD-ROMs, which makes them easier to manage.
Under normal circumstances, drive A and drive B refer to floppy drives. Whether your computer has a floppy drive installed or not, A and B are always reserved there. If you have one floppy drive, then it is drive A, and drive B remains empty. Starting from drive C through drive Z, they can all be assigned to hard disks—more precisely, to partitions on hard disks. Drive C is reserved for the primary partition, and after that the logical partitions are arranged in order as D, E, F, etc. Only after all partitions on the hard disk have been assigned drive letters are the remaining drive letters assigned to the CD-ROM drive or USB disk. For example, if a computer has one floppy drive, the hard disk is divided into one primary partition and four logical partitions, and there are also two CD-ROM drives, then the drive letter assignment for that computer would be: drive A for the floppy drive, drive B empty, drive C as the primary partition, D, E, F, G as those four logical partitions respectively, and H and I as those two CD-ROM drives.
3. Files and directories
The formal definition of a file is this: an ordered collection of information on a storage medium. In fact, we don't need to worry so much about that. We only need to know that after the computer starts, the pictures, movies, audio, documents, and so on that we can see are all files. Files can contain all kinds of content; for example command.com, hero.rm, and 梁祝.mp3 are all files, and files are the basic building units of software in a computer.
Files can store various kinds of data or audio/video, while there is one special kind of file that cannot store those things. It can only store other files and files like itself. We call it a directory or folder.
In today's operating systems, directories exist in a tree structure.
4. Programs and software
A program is generally some specific files. It may implement some function, or it may do nothing at all, but one characteristic is that it can be run, for example command.com or deltree.exe in a computer. Compared with a program, software is a much broader concept. In a computer, as long as a program can be used to accomplish some function, it can be called software. But correspondingly, it should at least be able to do something... Things like operating systems, games, and MP3 playback programs are all software.
In fact, in a computer, many functions are realized through software, and the main role of the operating system is only to act as the chief manager of software and hardware. Although powerful, it is not omnipotent; after all, it is only one kind of software.
5. Drivers
As mentioned earlier, the operating system is the chief manager of software and hardware. But unfortunately, since the operating system is after all just a product made by some company or individual, it cannot make all computer hardware fully perform to its potential. Likewise, it is also a product limited by time. For example, an operating system produced in 1998 may not necessarily support hardware produced in 2000, because our era is constantly progressing.
So, in order to bring out the performance of the hardware on your computer, the corresponding configuration file must be installed for that hardware, so that the operating system can recognize the hardware's new characteristics and let the hardware work better. This kind of configuration file is called a driver. The seller will provide it to you when you buy hardware, or you can obtain it from some specialized websites.

In fact, knowledge about operating systems goes far beyond this, but for beginners, having this much is enough to move on toward the next goals. Come on, let's see what we run into next.

3. Simple BIOS settings
There are some differences from so-called CMOS, but for now we can regard them as the same thing. It is the abbreviation of Basic Input/Output System. It is a small storage device built into the motherboard, containing code for controlling the keyboard, display, disk drives, serial communication devices, and many other functions. It is the software system that determines the computer's basic functions before the operating system in the computer has started taking over. Its settings determine the computer's performance. If its settings are accidentally wrong, the computer may fall into paralysis...
But readers don't have to turn pale right now. What we are learning in this section is only the basic settings. The so-called basic settings... simply mean making the computer obediently boot the operating system from the hard disk, floppy disk, or CD-ROM according to our arrangement when we need it. Below I will use Award BIOS as an example. Readers using other brands can infer the rest by analogy; it's very simple.
Generally when starting the computer there is a process of detecting hardware; this is the BIOS at work. Usually you will see words like "Press DEL to run setup" at the bottom of the screen. At that time, press the "Del" key (the 'Delete' or 'Del' key on the numeric keypad area), and hehe, you enter the BIOS setup. Ignore the rest for now and first look for a menu called "Advanced BIOS Setup." Press Enter to go in. Inside there is an option called "First Boot Device," and also things like "Second Boot Device" and "Third Boot Device." These are our targets—the first/second/third/fourth boot device options. The first boot device item is the most important. Move the cursor to it and press Enter or press PageDown, and you will find choices such as HDD-0/HDD-1/CD-ROM/LAN or C,D,CD-ROM/D,C,CD-ROM/CD-ROM, etc. Now this is the key point: we only need to remember that Floppy is the floppy drive, CD-ROM is the optical drive, and HDD-0 or C is the hard disk. In other words, whatever you choose in "First Boot Device" is what the system will try to boot from first.
Why specifically talk about this? There are two main reasons. One is that as a computer enthusiast, you will often run into situations where you need to install various operating systems, and choosing the boot order in BIOS is basic skill for installing all kinds of operating systems. The other reason is that China DOS Union has made a large number of classic and practical boot disks. How could we not download them and try them out? And if you want to try those boot disks, you need to know this trick.
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 3 Posted 2003-08-09 00:00 ·  中国 台湾 远传电信
元老会员
★★★★★
Credits 8,312
Posts 3,551
Joined 2003-03-22 00:00
23-year member
UID 1225
Gender Male
Status Offline
I support this with both hands, but for a formal post like this, I suggest the paragraphs should be more clearly separated
MSN:tiqit2@hotmail.com
Floor 4 Posted 2003-08-10 00:00 ·  中国 上海 宝山区 电信
金牌会员
★★★★
小飞侠
Credits 4,590
Posts 1,812
Joined 2003-04-02 00:00
23-year member
UID 1400
Gender Male
From 上海市
Status Offline
I suggest using a special color in the title!
That would make it stand out more!
Floor 5 Posted 2003-08-10 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Moderators and friends reading this, please note: the content of these posts is being posted for you to find mistakes and pick at faults. Please take a good look at the wording, the writing, and also some common-knowledge points. Right now a lot of this is being written from memory, and I don't know whether there are mistakes, so I need everyone to help correct it!

Thanks in advance!
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 6 Posted 2003-08-12 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
1. File and directory names
People and things in real life all have names, and computers are no exception. File naming has certain rules. Only files named according to the rules can be recognized by the operating system. In Windows98, the file naming rules are: a file name or folder name can contain up to 255 characters, including the drive and path name. The following characters cannot appear: \ / : * ? " →
The file name may use Chinese characters, and uppercase and lowercase English letters are preserved, but they are not distinguished when identifying the file.
Usually, every file has a three-character file extension. The extension follows the file name, separated by a dot, and usually consists of three characters. For example, in MyFile.txt, txt is the extension. The extension is used to identify the file type and the program that created the file. Under the default state of Windows 98, extensions are not displayed.
Under DOS character-interface operating systems, a file name may consist of at most 8 characters, and the extension may not exceed 3 characters. This is called the "8.3" rule. The rule specifies that certain characters cannot be used as file names, such as spaces, periods, semicolons, commas, double quotation marks, plus signs, equals signs, /, \, , etc.
The rule for converting Windows 98 file names to MS DOS file names is: if the main part of the file name is less than or equal to 8 characters, then it can directly be used as the short file name; otherwise, the first 6 characters are taken, then a "~" symbol is added, and then a number. For example, suppose there are two files with the long file names "Win 98使用指南.DOC" and "Win 98使用教程.DOC", then their corresponding short file names are "Win 98~1.DOC" and "Win 98~2.DOC".
Another thing is wildcards. In the operating system there are the following two wildcards: "*" and "?". Their function is to stand in for a certain class of file names. Among them, "*" can replace one or more characters in the main file name or extension. For example, "*.mp3" means all mp3 files, and "edit.*" means all files whose main file name is "edit". The role of "?" is similar to "*", but it can only replace one character, such as "win?????.com" or "format.???". Good use of wildcards can bring great convenience in file searching and lookup.


2. Paths
There is another concept related to directories, and that is the path. Actually, it is just the directory's position in the whole tree structure. For example, if on drive C you create a directory GAMES, and under the GAMES directory there is a file play.com, then the path of this play.com file is C:\GAMES.
In addition, in DOS there is also a distinction between absolute paths and relative paths. Everyone knows that in DOS you can only operate in command-line mode, for example "C:\>" or "D:\Winnt>" and so on. At that time, the "C:\>" or "C:\GAMES>" in front of the cursor is the current path. For example, suppose the current path is C:\GAMES, and under it there is a subdirectory called SAN5. At this point, if you want to view the files in that directory, the full command is "DIR C:\GAMES\SAN5”" and then press Enter. C:\GAMES\SAN5 is the absolute path, and no matter what directory you are in, if you enter this comm
and it will execute correctly. But now if you simply enter "DIR SAN5" and press Enter, you can achieve the same effect, because your current path is in C:\GAMES. This is a relative path. More convenient, but changeable.




Why is nobody coming to offer any suggestions...
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 7 Posted 2003-08-12 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Chapter 3 Basic DOS Commands


1. Starting from zero
Everyone knows that DOS is a command-line mode operating system, which means you must input commands and press Enter before the computer will carry out the operation you want. So how do we enter DOS? There are several situations:
1. If one of your partitions has only DOS installed, or a different operating system such as Windows2000 is installed on other partitions, then you can enter directly when booting up. Or if you choose DOS in a multi-boot menu and press Enter, that is also direct entry.
2. If your computer has the Windows98 operating system installed, then when booting you can press the "F8" key to enter the system menu. At that point press "Ctrl"+"F5" to enter pure DOS directly, or you can choose the last two items, "Command prompt only" or "Safe mode command prompt only," to enter DOS as well, except that some settings will be loaded.
3. If you have a boot disk, whether floppy disk or CD-ROM, and your computer happens to have a floppy drive or optical drive, then regardless of whether your computer has an operating system installed, or what operating system is installed, as long as you choose to boot from floppy drive or optical drive in BIOS, and then insert the boot disk into the floppy drive or optical drive, you can also enter DOS.

One thing to note is that what kind of operating system you can boot into depends on the system installed on your system disk. Here, unless otherwise specified, the DOS referred to means MS-DOS.


2. The basic format of DOS commands
Since they are commands, they naturally have corresponding formats. Now let us take a look at what the basic format of DOS commands is.

command name drive\path\source filename drive\path\target filename /parameter1/parameter2

They are separated by spaces. And after entering a command, you must end it with the Enter key.

Now let me explain. The command name at the front determines the function and type of the operation. For example, COPY performs a copy operation, DIR is for viewing files, DEL is a delete instruction, and so on. The source file and target file after that are both the objects of the operation. For example, the copy command copies from the source file to the target file, and a compare command compares files in two places, etc. Some commands have only one object of operation. For example, if you want to transfer system files to drive A, then the only object is drive A, so the later operation object part has to be adjusted. As for parameters, they are selections for command details. For example, if you add "/S" after the format command, system files will be transferred after formatting; if you add "/Q", it will be a quick format, etc.
For path issues in commands, please refer to the explanation of current path, relative path, and absolute path in the article "Computer Basics."
Of course, there are many DOS commands, and their formats are varied. One basic format cannot describe them all clearly. But generally speaking, they all change from this as a prototype.


3. Common command categories
1. Basic classification method
The usual textbook method is to divide them into internal commands and external commands. So-called internal commands are commands that the system automatically supports as soon as the computer enters DOS; they are already integrated into the operating system. External commands, on the other hand, can be regarded as software on the DOS platform, because they require the support of the corresponding command files. For example, to do partitioning there must be an FDISK.COM file present; to format a disk there must be a FORMAT.COM file... In fact, most of the functions implemented by external commands can be replaced by software, just as there are now many partitioning programs under DOS that are better than FDISK.COM.
2. Classification by function
I personally think this is a rather good classification method, because in this way you can quickly recognize the function of various commands and some similar commands, and you won't confuse them. The command categories introduced below were organized by myself. Maybe some of them are not distinguished very clearly, but for beginners, mastering them clearly will be enough to roam in the DOS world.


4. Directory operation commands
1. Drive switching command internal command
This command is very simple: just enter the drive letter and press Enter. For example, if you enter "D:" and press Enter, the current drive switches to drive D. If you enter "F:" and press Enter, the current drive switches to drive F. The premise is that drive D and drive F must exist.
2. MD create directory internal command
The format of this command is: MD drive\path\directory name . For example, entering the command " MD C:\ABC " creates a directory named ABC in the root directory of drive C, and entering "MD BAK" creates a directory named BAK in the current directory.
3. CD enter/exit directory internal command
The format of this command is: CD drive\path\directory name . For example, entering " CD C:\WINDOWS”" switches the current directory to C:\WINDOWS. But note one thing: if your current directory is now "C:\ABC”", and then you enter "CD D:\GAMES”", your current directory is still C:\ABC. Only when you switch to drive D using the drive switching command will the current directory change to D:\GAMES.
4. RD delete empty directory internal command
The format of this command is: RD drive\path\directory name . For example, entering " RD D:\TEMP”" can delete the TEMP directory under the root directory of drive D. But note that it can only delete a directory that really exists, and that directory must be an empty directory, meaning there cannot be any files or subdirectories under it.
5. DELTREE directory deletion command external command
The format is: DELTREE drive\path\directory name . A very useful directory deletion command. Its function is similar to RD, but the advantage it has over RD is that it can directly delete a directory whether or not there are files or subdirectories under it.
6. DIR view command internal command
The format is: DIR drive\path\directory name /S /A /D /P /W 。One of the most common commands. It can be used to view and search files and directories in the computer. The search range can be one directory or one partition, but it cannot view several targets at the same time. If you use DIR to view without parameters, it will display the non-hidden files and directories under the directory to be viewed, and only within that directory; contents inside other subdirectories under that directory will not be listed. In addition, although this command can list in detail the size, creation date, and other detailed contents of the object being viewed, if there are many files under the directory being viewed, it will simply keep scrolling all the way to the bottom, making it impossible to see clearly what is there.
The application of parameters makes it much more flexible. Adding "/S" can search for files in the entire directory tree, including subdirectories under the target directory and subdirectories under those subdirectories. "/A" lets you view files of all attributes. "/D" omits files and shows only directories, making it easier to search for directories quickly. "/P" will automatically pause when the number of files or directories in the directory being viewed is large enough to fill one screen, and continue displaying only after any key is pressed. "/W" makes files or directories display in wide format, that is, five per line, listing only the file or directory names, which speeds up the process of looking for files.
7. PATH path setting command internal command
The format is: PATH drive\path\directory name . A very practical command. Under normal circumstances, after you enter a command, DOS first determines whether it is an internal command. If it is, it executes it; if not, it will only search in the current directory... PATH lets you set several default paths, which makes DOS seem a little smarter. PATH has three functions. The first is setting paths; the command format is as described above. When setting multiple paths, the two paths should be separated by a semicolon ";". For example: "PATH C:\WINDOWS\COMMAND;C:\;D:\DOS”"; the second is checking what paths are currently set, and the command is "PATH"; the third is canceling the paths already set, and the command is "PATH;".
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 8 Posted 2003-08-13 00:00 ·  中国 香港 有线宽频用户
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
Your explanation of the DIR command is incomplete

Displays a list of files and subdirectories in a directory.

DIR attributes]]
sortorder]] timefield]]


Specifies the drive, directory, or file to display.

/A Displays files with the specified attributes.
attributes D directories R read-only files
H hidden files A archive files
S system files - not meaningful
/B Uses bare format (no header information or summary).
/C Displays the thousand separator in file sizes. This is
the default value. Use /-C to disable the separator.
/D Same as wide list format, but sorted by columns.
/L Uses lowercase.
/N Uses the new long list format, with file names displayed at the far right.
/O Lists files in the specified sort order.
sortorder N by name (alphabetical) S by size (smallest first)
E by extension (alphabetical) D by date and time (earlier date first)
G list subdirectories first - means reverse order
/P Pauses after each screenful of information.
/Q Displays the file owner.
/S Displays files in the specified directory and all subdirectories.
/T Specifies which time field to display or use for sorting.
timefield C creation
A last file access time
W last file write time
/W Uses wide list format.
/X Displays the short names generated for non-8.3 file names.
This format is the same as /N, but the short name is inserted
before the long name. If no long name exists, that position
is shown as blank.
/4 Displays the year with four digits

Parameters may be preset in the DIRCMD environment variable. You can use a hyphen prefix (-)
on any parameter to override the preset setting -- for example: /-W。
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 9 Posted 2003-08-13 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
You didn't introduce long file names..
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 10 Posted 2003-08-13 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Thanks to Wengier and Roy for pointing out the loopholes in my article.
Here I'd also like to ask you two something: should the article content be made complete, for example as detailed as Roy's introduction to the DIR command? Or is it enough to just write the commonly used commands and parameters?
I'd also like to ask the other moderators and registered members to come discuss it too.


艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 11 Posted 2003-08-13 00:00 ·  中国 台湾 台南市 远传电信
元老会员
★★★★★
Credits 8,312
Posts 3,551
Joined 2003-03-22 00:00
23-year member
UID 1225
Gender Male
Status Offline
The following is quoted from cn_archer at 2003-8-13 21:55:20:
Thanks to Mengier and Roy for pointing out the loopholes in my article.
Here I'd also like to ask you two something: should the article content be made complete, for example as detailed as Roy's introduction to the DIR command? Or is it enough to just write the commonly used commands and parameters?
I'd also like to ask the other moderators and registered members to come discuss it too.


Hehe... since when did Wengier change his name to Mengier?? Hehe.....
MSN:tiqit2@hotmail.com
Floor 12 Posted 2003-08-13 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Ah!! My mistake...
I got completely muddle-headed while typing today...
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 13 Posted 2003-08-18 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
8. TREE display directory structure external command
The basic format is "TREE drive\path\directory name /F /A". Its function is to display the directory structure of a drive or path in a tree diagram. The parameter "/F" displays the names of the files in each folder. The parameter "/A" uses ASCII characters instead of extended characters. Personally I don't think there's much difference, and the "/F" parameter looks nicer.
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 14 Posted 2003-08-18 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
22-year member
UID 7391
Gender Male
From 福建省
Status Offline
Everyone come help me take a look

5. File operation commands
1. COPY file copy internal command
One of the DOS commands you absolutely need. The basic format is " COPY drive\path\source filename drive\path\target filename". It is one of the most commonly used commands under DOS. Its function is to copy one or more files to the required place. For example, "COPY C:\STUDY\STUDENT.TXT D:\BAK\STU.TXT”" means copying the file STUDENT.TXT from the STUDY directory on drive C to the BAK directory on drive D, and renaming it to STU.TXT. Of course, not renaming it is also fine, and wildcards can also be added in the command.
In fact, it has many parameters and other usages, but beginners should first master this basic usage. Rome wasn't built in a day!
2. DEL delete file internal command
A very commonly used command. The basic format is "DEL drive\path\filename". Its function is to delete the specified file, but it can only delete files. Together with wildcards, it can delete one or more files.
3. REN rename internal command
The basic format is "REN drive\path\original filename new filename". Its function is simply renaming. Besides renaming files, it can also rename empty directories, but it is ineffective for directories that contain files or subdirectories.
4. TYPE view file contents internal command
The basic format is "TYPE drive\path\filename", used to view the contents of a specified file. Unfortunately, it can only view text or ASCII-format files.
5. EDIT text editing external command
A very practical external command. You can directly enter "EDIT" to start it, or use the form "EDIT drive\path\filename" to edit or create a text file. In fact, under early DOS, editing AUTOEXEC.BAT and CONFIG.SYS was done almost entirely with it. But similar to the TYPE command, it can only operate on text or ASCII-format files.
6. XCOPY copy files or directories external command
The basic format is "XCOPY drive\path\source file or directory name drive\path\target directory name /S /E ……". An extremely practical command. Its function is similar to COPY, but it is far more powerful than COPY. It can copy files and directories, even including contents in subdirectories and sub-subdirectories under a directory. It has quite a lot of parameters; here I'll briefly introduce the two most practical ones.
The /S parameter can copy all files and directories in the operating directory except empty directories. /E copies all files and directories in the operating directory, including empty directories. The other parameters won't be explained for now; I'll introduce them when I get the chance.
7. MOVE move files or directories external command
The basic format is "MOVE drive\path\source file or directory name drive\path\target file or directory name /Y or /-Y". Also a very practical command, similar to XCOPY. The difference is that XCOPY copies, while MOVE moves. Its two parameters /Y and /-Y have exactly opposite functions: /Y cancels the prompt for confirming overwrite of an existing target file, that is, all prompts are answered YES, while /-Y is the opposite.
8. FC file comparison external command
The basic format is "FC drive\path\filename drive\path\filename /parameter". Its main function is to compare two files or two sets of files and display their differences. Sometimes it is very useful. For example, if you want to know what a certain software added to the registry, just compare the registry backups from before and after installation. There are quite a few parameters; I'll list them all, since file comparison needs detailed information.
/A Displays only the first and last lines for each set of differences.
/B Performs a binary comparison.
/C Disregards case.
/L Compares files as ASCII text.
/LBn Sets the maximum consecutive mismatches to the specified number of lines.
/N Displays line numbers on an ASCII comparison.
/OFF Does not skip files with the offline attribute set.
/T Does not expand tabs to spaces.
/U Compares files as UNICODE text files.
/W Compresses whitespace (tabs and spaces) for comparison.
/nnnn Specifies the number of consecutive matching lines that must follow a mismatch.
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 15 Posted 2003-10-27 00:00 ·  中国 内蒙古 赤峰 联通
初级用户
逸海游神
Credits 151
Posts 14
Joined 2003-10-25 00:00
22-year member
UID 11905
Gender Male
Status Offline
Nice summary, cheering you on


Keep going keep going carry it forward
看时光如流水,~'~'~._
    (((\\~ _~'~.
     )a , ~ _~,,,~'~
    \_  /,-~,,~''
     \ )--. 
      \/  '
      )&,  ._ ',
      \_\_ ( '. \
       '.___'. 让美丽属于你!

我们的智慧来源于不断的学习,愿真诚和睿智永远陪伴着我们。

⊙ㄍ⊙ㄍ 我愿如鱼 ⊙ㄍ⊙ㄍ 游弋在知识的海 £ㄍ£
Forum Jump: