💾 Archived View for spam.works › mirrors › textfiles › computers › mrdos5.txt captured on 2023-06-14 at 16:04:00.
-=-=-=-=-=-=-
DOS Level 3: The world of DOS is a large one. There are many, many commands with optional switches in the realm of file management. Fortunately, like most software there is a flow and feel to DOS. After you are familiar with the core commands, looking up additional ones and figuring out how to use them becomes easier. The pattern is a DOS word (DIR, COPY, DEL....) followed by the necessary, minimum information to make it go. For example: A>DIR B: DIR only needs the drive the directory is desired A>Copy C:sample.doc B: COPY needs 3 pieces of information - what file on which drive is to be copied to which drive A>DEL B:Test.EXE DEL needs 2 pieces of information - what file on which drive to delete SOFTWARE VERSIONS ----------------- Software is labeled with a version number. With each subsequent release of the product, the version number increases. The reason for these upgrades are to rid "bugs" (problems) within the software, significant product improvements, and/or to exploit new hardware advancements. In general, anything created on an earlier version of a software will work with a later version of the same software. This is known as upward compatibility. The reverse is rarely true. DOS first hit the market as version 1.0 in 1981. It has gone thru many upgrades as new hardware components became available and new DOS features were added. Currently DOS 4.X is available. However, most systems are still using DOS 3.X versions. For a single user system, any DOS version over 2.1 is probably adequate. If you are using high density 3.5 inch floppy drives, you will need at least DOS 3.X. When application software is purchased, DOS version requirements are noted on the package as well as RAM requirements. FILE ALLOCATION TABLE --------------------- As was discussed earlier formatting a new floppy disk prior to use, electronically superimposes a grid system on the disk. Each grid intersection (sector) is numbered. The location of files pieces on a disk are noted in a File Allocation Table (FAT) on each disk. When a file is copied to a disk, the FAT is checked for available sector locations. The FAT is like an index to the location of file pieces on the disk. File portions DO NOT have to be in adjacent sectors. As a disk repeatedly has new files copied to it and old files deleted, files become fragmented - portions of the file exist in non-adjacent sectors. This situation is referred to as non-contiguous sectors. Data integrity is not affected by this situation, but the speed in which data can be retrieved is. There are many third party products to "defragment" a disk. If the programs you will be using are disk intensive - like accounting or database management, you will notice a slowing of program execution over time as files become fragmented. When a file is deleted from a disk, the contents are not wiped from the sectors, rather the file name is removed from the FAT and the associated sectors are now simply declared available for new data. This is important to understand because deleted files are actually still on the disk but their locations are now not considered off limits. Again, many third party software products are available to undelete these files. If you do delete a file, try not to use the disk until the proper utility software is available to reverse the deletion. With more use, you are running the risk that the next file that is copied to the disk will occupy the sectors of file you wish to undelete. If that should happen, you will not be able to undelete the "old" file. Some popular third party utility tools to defragment a disk and allow undeletion include PC TOOLS, NORTON UTILITIES, MACE UTILITIES, VOPT DISK OPTIMIZER. BATCH FILES ----------- Batch files are a DOS tool that allow you to automatically execute 1 or more DOS commands sequentially. A more detailed explanation can be found under Hard Disk Dos sections. For example, you are tired of changing default drives, subdirectories and typing the word LOTUS each time you wish to enter into the LOTUS 123 spreadsheet program. The 3 steps required are: A>C: C>cd\lotus C>lotus These steps can be combined with a single BATCH file called LOT.BAT. To build: C>copy con:lot.bat --- Begin creating a file called lot.bat C: cd\lotus lotus <F6> --- End building and save to disk by pressing the <F6> function key Now, each time LOT is entered at the DOS prompt, the commands within the LOT.BAT file are automatically executed sequentially. C>lot REDIRECTION ----------- Redirection refers to having input or output come or go to devices other than the standards of Keyboard (Input) and Monitor (output). In DOS we expect to enter commands from the Keyboard and have the results displayed on the Monitor. A>DIR --- Gives a directory of the A drive disk on the monitor A>DIR >PRN --- PRN means to send the results of this command to the printer A>DIR >LIST.TXT --- Now the output of this command is put into a file on the A disk called LIST.TXT (any filename could have been used) The greater than sign ( > ) used above was to REDIRECT the output to a Printer and a Disk File rather than the default output device; the monitor. This is useful for getting a hard copy print-out of a particular disk's contents. PIPING - FILTERS ---------------- Piping is a way of telling DOS to transfer the output from one command to be the input for another command. Piping is a form of redirection except DOS will create a temporary file on a disk to accomplish the task. Piping usually involves the use of special commands, termed Filters, to accept data, do something with it, and then pass it to the next step. There are 3 standard filters used by DOS in piping: FIND - used to search a file directory for a specified string of text MORE - used to display one 1 screen of output at a time SORT - used to sort disk filenames The symbol used by DOS to indicate a Piping operation is the vertical bar (|). Examples: A>DIR |sort --- Will display on the monitor the list of files on the A disk, BUT in filename alphabetic order. A>DIR |sort/+10 --- Will display on the monitor the list of files on the A disk, BUT by alphabetic order of the filename extensions. Extensions are 10 characters from the left on the screen during a DIR. A>DIR |sort >prn -- Same as the 1st example except the results of this command will be printed out. A>DIR |sort >SAM.D - Same as the 1st example except the results of this command will be saved in a file on the disk called SAM.D A>DIR |sort |more -- Will display in sorted order one screen at a time A>DIR |find "05-14-89" -- Will display a list of files that were last changed on May 14, 1989 A>DIR |find "SALES" -- Will display a list of files that have the word SALES in the file name