{"id":114,"date":"2009-01-29T10:09:42","date_gmt":"2009-01-29T10:09:42","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2009\/01\/29\/dos-tutorial-the-basics\/"},"modified":"2017-12-26T01:00:42","modified_gmt":"2017-12-26T01:00:42","slug":"dos-tutorial-the-basics","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/dos-tutorial-the-basics\/","title":{"rendered":"DOS TUTORIAL : THE BASICS | MS-DOS Learning Resources"},"content":{"rendered":"<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4002 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/dos-tutorial.png\" alt=\"dos-tutorial\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/01\/dos-tutorial.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/01\/dos-tutorial-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p align=\"left\"><strong><u>DOS TUTORIAL : THE BASICS<\/u><\/strong><br \/>\nCompilation by Lisa Lemieux, UC Call Center<br \/>\n<strong>Table of Contents<\/strong><br \/>\nI. Lesson 1<br \/>\n<a href=\"#1A\">\u00a0 A. Hardware and Software differences.<\/a><br \/>\n<a href=\"#1B#1B\">B. What is DOS?<\/a><br \/>\n<a href=\"#1C\">\u00a0 C. Why You Need DOS.<\/a><br \/>\n<a href=\"#1D\">\u00a0 D. Set the Date and Time.<\/a><br \/>\n<a href=\"#1E\">\u00a0 E. Check the Date and Time.<\/a><br \/>\nII. Lesson 2<br \/>\n<a href=\"#2A\">\u00a0 A. Directory Command.<\/a><br \/>\n<a href=\"#2B\">\u00a0 B. Scroll Through the Directory Listing.<\/a><br \/>\n<a href=\"#2C\">\u00a0 C. Pause a Directory Listing.<\/a><br \/>\n<a href=\"#2D\">\u00a0 D. View a Wide Listing of Files.<\/a><br \/>\n<a href=\"#2E\">\u00a0 E. Recall a DOS Command.<\/a><br \/>\n<a href=\"#2F\">\u00a0 F. Print a Directory Listing.<\/a><br \/>\n<a href=\"#2G\">\u00a0 G. Check for a Single File.<\/a><br \/>\n<a href=\"#2H\">\u00a0 H. Check for a Group of Files.<\/a><br \/>\n<a href=\"#2I\">\u00a0 I. List Files with the Same Extension.<\/a><br \/>\n<a href=\"#2J\">\u00a0 J. Clear the Screen.<\/a><br \/>\nIII. Lesson 3<br \/>\n<a href=\"#3A\">\u00a0 A. Create a DOS File.<\/a><br \/>\n<a href=\"#3B\">\u00a0 B. Copy a File.<\/a><br \/>\n<a href=\"#3C\">\u00a0 C. Copy a File with a New Extension.<\/a><br \/>\n<a href=\"#3D\">D. Type a File with DOS.<\/a><br \/>\n<a href=\"#3E\">E. Rename a File<\/a><br \/>\n<a href=\"#3F\">F. Rename a Group of Files<\/a><u> <\/u><br \/>\nIV. Lesson 4<br \/>\n<a href=\"#4A\">A. Create a Subdirectory.<\/a><br \/>\n<a href=\"#4B\">B. Move to a Subdirectory.<\/a><br \/>\n<a href=\"#4C\">C. Set the DOS Prompt.<\/a><br \/>\n<a href=\"#4D\">D. Move to the Parent Directory.<\/a><br \/>\n<a href=\"#4E\">E. Copy a File into a Subdirectory.<\/a><br \/>\n<a href=\"#4F\">F. Copy a Group of Files into a Subdirectory.<\/a><br \/>\n<a href=\"#4G\">G. List Files in the Root from the Subdirectory.<\/a><br \/>\n<a href=\"#4H\">H. Select the Directory List.<\/a><br \/>\n<a href=\"#4I\">I. List Subdirectories.<\/a><br \/>\nV. Lesson 5<br \/>\n<a href=\"#5A\">A. Delete a Single File.<\/a><br \/>\n<a href=\"#5B\">B. Delete a Group of Files.<\/a><br \/>\n<a href=\"#5C\">C. Delete all Files in a Subdirectory.<\/a><br \/>\n<a href=\"#5D\">D. Remove a Subdirectory.<\/a><br \/>\nVI. Lesson 6<br \/>\n<a href=\"#6A\">A. Format a Floppy Disk.<\/a><br \/>\n<a href=\"#6B\">B. Change the Default Drive.<\/a><br \/>\n<a href=\"#6C\">C. Diskcopy Command. <\/a><br \/>\n<a href=\"#6D\">D. Copying a File from the Hard Drive to a Floppy.<\/a><\/p>\n<hr size=\"2\" width=\"100%\" \/>\n<p align=\"left\"><strong><u><br \/>\nBefore you begin this tutorial<\/u><\/strong><strong>, please make sure that your prompt is C:\\&gt; If it is not, please do the following:<\/strong><br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>c:<\/strong><br \/>\n2. Type: <strong>cd..<\/strong><br \/>\nThis should place you into the C:\\&gt; working directory.<br \/>\n<strong><u>NOTE<\/u>:<\/strong> DOS is not case sensitive; therefore, a command can be entered in with CAPITAL LETTERS, lower-case letters, or a MiXtuRe of the two.<\/p>\n<hr size=\"2\" width=\"100%\" \/>\n<p align=\"left\"><a title=\"1A\" name=\"1A\"><\/a><strong>Hardware and Software Differences<\/strong><br \/>\nThere are two parts to a computer system, the hardware and the software. Hardware refers to the physical components of a computer. An example of hardware components would be the monitor, keyboard and mouse. Software represents the programs which contain a set of instructions written to perform a certain task on the computer.<\/p>\n<p align=\"left\"><a title=\"1B\" name=\"1B\"><\/a><strong>What is DOS?<\/strong><br \/>\nDOS stands for <u>D<\/u>isk <u>O<\/u>perating <u>S<\/u>ystem. DOS controls the computer\u2019s hardware and provides an environment for programs to run. This system program must always be present when working with your computer.<\/p>\n<p align=\"left\"><a title=\"1C\" name=\"1C\"><\/a><strong>Why You Need DOS<\/strong><br \/>\nThere are a variety of reasons why you need DOS. A few of them are listed below to satisfy your curiosity.<br \/>\n1. DOS controls the flow of information between you and the computer (translator).<br \/>\n2. DOS allows you to store information on your computer.<br \/>\n3. DOS allows you to retrieve information stored on your computer.<br \/>\n4. DOS interprets and translates the software you have on your computer.<br \/>\n5. DOS gives you access to all its function (i.e. saving, copying, and printing files).<\/p>\n<p align=\"left\"><a title=\"1D\" name=\"1D\"><\/a><strong>Set the Date and Time<\/strong><br \/>\nMost computers on campus have an internal clock that will automatically set the date and time for you when you turn the computer on. However, if your computer does not have this feature or your computer has two floppy drives, you will need to do the following steps to set the date and time.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type the date like this: <strong>1-15-97<\/strong><br \/>\n2. Press the <strong>return key<\/strong> (enter key).<br \/>\n3. Type the time like this: <strong>8:46<\/strong><br \/>\n4. Press <strong>return.<\/strong><br \/>\n5. Notice that the <strong>C:\\&gt;<\/strong> prompt will appear.<br \/>\nDOS marks the date and time on everything you do. It is important to periodically check the date and time if you have an internal clock to see if it is correct. If you have a two floppy system, it is important to enter the correct date and time when you turn the computer on.<br \/>\n<strong>NOTE<\/strong>: Baynan sets the date and time for you automatically when you Login.<\/p>\n<p align=\"left\"><a title=\"1E\" name=\"1E\"><\/a><strong>\u00a0Check the Date and Time<\/strong><br \/>\nDOS will let you check or change the date and time once it has been set. The procedure to do this is as follows:<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>date<\/strong> and press<strong> return<\/strong>.<br \/>\n2. If the correct date is displayed, simply press return. If the date is incorrect, type the correct date and press return.<br \/>\n3. Type: <strong>time<\/strong> and press <strong>return.<\/strong><br \/>\n4. If the correct time is displayed, simply press return. If the time is incorrect, type the correct time and press return.<\/p>\n<p align=\"left\"><a title=\"2A\" name=\"2A\"><\/a><strong>Directory Command<\/strong><br \/>\nThe <strong>DIRECTORY<\/strong> command is like a table of contents in a book. This directory will list the following information:<\/p>\n<div align=\"left\">\n<ul>\n<li>Filenames<\/li>\n<li>File extensions<\/li>\n<li>Size of each file<\/li>\n<li>Date and time the file was last updated.<\/li>\n<\/ul>\n<\/div>\n<p align=\"left\"><u>Directions:<\/u><br \/>\n1. At the C:\\&gt; type: <strong>dir<\/strong> and press <strong>return<\/strong>.<br \/>\n2. The list of files will scroll up and off the screen.<br \/>\n<strong>NOTE:<\/strong> At the end of the listing, there is a line that shows the number of bytes free on the hard drive.<\/p>\n<p align=\"left\"><a title=\"2B\" name=\"2B\"><\/a><strong>Scroll Through the Directory Listing<\/strong><br \/>\nWhen you type the <strong>DIR<\/strong> command and press return, the files begin to scroll vertically on your screen. If you have a lot of files it is difficult to read each one. By holding down the <strong>Control Key (CTRL)<\/strong> and the letter <strong>S<\/strong> at the same time, you are able to freeze the listing to view your files. When you are finished, press the spacebar for the list to continue.<br \/>\n<strong>NOTE:<\/strong> You must return to the C:\\&gt; before entering your next command.<\/p>\n<p align=\"left\"><a title=\"2C\" name=\"2C\"><\/a><strong>Pause a Directory Listing<\/strong><br \/>\nYou can add a <strong>PAUSE<\/strong> command to your directory command which will allow you to view your directory one screen at a time.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir\/p<\/strong> and press <strong>return.<\/strong><br \/>\n2. The screen freezes after it fills the screen with the files that are listed first in the directory.<br \/>\n3. Press the <strong>spacebar<\/strong> to continue listing you files.<br \/>\n4. Continue to press the <strong>spacebar<\/strong> until you return back to the C:\\&gt; prompt.<\/p>\n<p align=\"left\"><a title=\"2D\" name=\"2D\"><\/a><strong>\u00a0View a Wide Listing of Files<\/strong><br \/>\nWhen you need to quickly view your files, you can add a <strong>\/W<\/strong> to the directory command. This will display your files into five columns on the screen.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir\/w<\/strong> and press <strong>return<\/strong>.<br \/>\n2. DOS will list only the name of you file and the file extension on the screen.<br \/>\n<strong>NOTE:<\/strong> Use this command when you are not concerned with looking at the file size or the date it was created.<br \/>\n<a title=\"2E\" name=\"2E\"><\/a><strong>Recall a DOS Command<\/strong><br \/>\nThe <strong>F3<\/strong> function key can be used to recall the last DOS command you typed in. If you would like to retrieve a previously entered command, you can also press the <strong>up arrow key<\/strong> continuously until you reach the desired command you were looking for.<br \/>\n<strong>NOTE:<\/strong> You can also type out each letter in your last command by using the <strong>right arrow key<\/strong> or the <strong>right cursor key<\/strong>. After you use the<strong> F3<\/strong> key to recall a command, you can use the <strong>backspace key<\/strong> to edit any part of the command or add to your command.<\/p>\n<p align=\"left\"><a title=\"2F\" name=\"2F\"><\/a><strong>Print a Directory Listing<\/strong><br \/>\nYou can print a list of your files in your directory by instructing DOS to send the information to your printer.<br \/>\n<u>Directions: <\/u><br \/>\n1. Type: <strong>dir&gt;prn <\/strong>and press <strong>return.<\/strong><br \/>\n2. The <strong>&gt;<\/strong> symbol stands for output. The PRN stands for printer.<br \/>\n<strong>NOTE:<\/strong> You can print a wide listing of your files by typing <strong>dir\/w&gt;prn<\/strong><br \/>\nLaserjet printers and other sheetfeeder printers will not eject the page after the dir&gt;prn command. You must take the printer off-line and press the form feed button. Remember to press the on-line button when you are done in order to continue using the printer.<\/p>\n<p align=\"left\"><a title=\"2G\" name=\"2G\"><\/a><strong>Check for a Single File<\/strong><br \/>\nInstead of using the directory command to look for one particular file, you can type the name of the file after the DIR command at the C:\\&gt; prompt.<br \/>\n<u>Directions:<\/u><br \/>\n1. Make sure that you are at your <strong>C:\\&gt;<\/strong> prompt.<br \/>\n2. Type: <strong>dir format.com<\/strong> (filename.extension) and press <strong>return<\/strong>.<br \/>\n3. The screen will display a listing of the file or a file not found message.<\/p>\n<p align=\"left\"><a title=\"2H\" name=\"2H\"><\/a><strong>Check for a Group of Files<\/strong><br \/>\nThe<strong> *<\/strong> symbol is referred to as a wildcard and stands for any character or group of characters. This is helpful when you want to list files that start with a particular letter or group.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir c*<\/strong> and press <strong>return<\/strong>.<br \/>\n2. All filenames that begin with the letter C will be listed.<br \/>\n3. Press the<strong> F3 key<\/strong>.<br \/>\n4. <strong>Backspace twice<\/strong> and replace C* with <strong>A* <\/strong>and press<strong> return.<\/strong><br \/>\n5. All filenames that begin with the letter A are listed.<\/p>\n<p align=\"left\"><a title=\"2I\" name=\"2I\"><\/a><strong>List Files with the Same Extensions<\/strong><br \/>\nYou can also use the wildcard character <strong>*<\/strong> to look for a group of files with the same extension.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir *.bat<\/strong> and press<strong> return.<\/strong><br \/>\n2. All files with the <strong>.bat<\/strong> extension are listed.<br \/>\n3. Press the <strong>F3 key.<\/strong><br \/>\n4<strong>. Backspace three times<\/strong> and replace the .bat extension with the <strong>.sys<\/strong> extension and press <strong>return.<\/strong><br \/>\n5. All files with the <strong>.sys<\/strong> extension should now be listed.<\/p>\n<p align=\"left\"><a title=\"2J\" name=\"2J\"><\/a><strong>Clear the Screen<\/strong><br \/>\nWhen the screen get full of information, you may want to clear it. To do this, type <strong>CLS <\/strong>at the C:\\&gt; prompt and press <strong>return<\/strong>.<\/p>\n<p align=\"left\"><a title=\"3A\" name=\"3A\"><\/a><strong>Create a File with DOS<\/strong><br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>copy con Quick.ltr<\/strong> and press <strong>return.<\/strong><br \/>\n2. Type this message in the following format:<br \/>\n<strong>Bob<\/strong><br \/>\n<strong>Sales are up 15%.<\/strong><br \/>\n<strong>Good Job!<\/strong><br \/>\n<strong>Craig<\/strong><br \/>\n3. Press the <strong>F6 function key (^Z) <\/strong>and press <strong>return.<\/strong><br \/>\n4. DOS gives you a message that <strong>1 File(s) has been copied<\/strong>.<br \/>\n5. Type: <strong>dir q* <\/strong>and press <strong>return<\/strong>.<br \/>\n6. Now you can see the list of files beginning with the letter Q.<br \/>\n<strong>NOTE:<\/strong> You can also use the <strong>COPY<\/strong> command to print a file by typing: <strong>copy quick.ltr prn<\/strong> and press<strong> return<\/strong>.<\/p>\n<p align=\"left\"><a title=\"3B\" name=\"3B\"><\/a><strong>Copy a File<\/strong><br \/>\nYou can use the <strong>COPY<\/strong> command to copy one file to another.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>copy quick.ltr quick2.ltr <\/strong>and press <strong>return.<\/strong><br \/>\n2. DOS will tell you one file has been copied.<br \/>\n3. Type: <strong>dir q* <\/strong>and press<strong> return.<\/strong><br \/>\n4. You should have two files listed with different names.<br \/>\n<strong>NOTE:<\/strong> Filenames cannot be more than eight characters in length. File extensions cannot be more than three characters in length.<\/p>\n<p align=\"left\"><a title=\"3C\" name=\"3C\"><\/a><strong>Copy a File with a New Extension<\/strong><br \/>\nYou can also use the <strong>COPY<\/strong> command to copy the file with a different filename extension.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>copy quick.ltr quick.bac <\/strong>and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir q* <\/strong>and press <strong>return.<\/strong><br \/>\n3. Three files should be listed.<\/p>\n<p align=\"left\"><a title=\"3D\" name=\"3D\"><\/a><strong>Type a File with DOS<\/strong><br \/>\nIf you need to check the contents of a particular file or any DOS file, you will need to use the <strong>TYPE <\/strong>command.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>type quick2.ltr<\/strong> and press<strong> return<\/strong>.<br \/>\n2. DOS prints the contents of the file.<br \/>\n<strong>NOTE:<\/strong> Never use the <strong>TYPE <\/strong>command with files that have <strong>the .com, .exe, .sys, and .bas extensions.<\/strong> These are program files and will only display junk on the screen.<\/p>\n<p align=\"left\"><a title=\"3E\" name=\"3E\"><\/a><strong>Rename a File<\/strong><br \/>\nThe <strong>RENAME<\/strong> command lets you rename a previous file with a new name.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>ren quick2.ltr sales.ltr <\/strong>and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir *.ltr <\/strong>and press <strong>return.<\/strong><br \/>\n3. DOS lists only two files that have the .ltr extension: <strong>quick.ltr and sales.ltr.<\/strong><\/p>\n<p align=\"left\"><a title=\"3F\" name=\"3F\"><\/a><strong>Rename a Group of Files<\/strong><br \/>\nWith the wildcard character *, you can also use the <strong>RENAME <\/strong>command to change a group of files.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>ren *.ltr *.bob<\/strong> and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir *.bob <\/strong>and press <strong>return.<\/strong><br \/>\n3. You should have two files listed with a .bob extension.<br \/>\n4. Type: <strong>dir *.ltr <\/strong>and press <strong>return.<\/strong><br \/>\n5. There should be no files found with .ltr extensions.<br \/>\n<strong>NOTE:<\/strong> You can also rename a group of files that have the same name but different extensions. Type the <strong>RENAME<\/strong> command then the filename followed by the dot and the wildcard, space and then type the new filename followed by a dot and the wildcard character. It will look like this: <strong>filename.* newfilename.*<\/strong><br \/>\n<a title=\"4A\" name=\"4A\"><\/a><strong>Create a Subdirectory<\/strong><br \/>\nTo create a subdirectory, you will need to use the <strong>MAKE DIRECTORY<\/strong> command, a.k.a. <strong>MD<\/strong>. The <strong>MD<\/strong> command is useful for organizing files on your hard drive. With subdirectories, you can create and store related files together. For example, one subdirectory could be used to store all word processing files and another for all spreadsheet files.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>md \\info<\/strong> and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir *. <\/strong>and press <strong>return.<\/strong><br \/>\n3. Notice the *. will list only the subdirectories.<\/p>\n<p align=\"left\"><a title=\"4B\" name=\"4B\"><\/a><strong>Move to a Subdirectory<\/strong><br \/>\nOnce you have created a subdirectory, to move to that directory, you will use the <strong>CHANGE DIRECTORY<\/strong> command, a.k.a.<strong> CD<\/strong>.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>cd \\info<\/strong> and press <strong>return.<\/strong><br \/>\n2. Type: <strong>cd <\/strong>and press<strong> return.<\/strong><br \/>\n3. The name of the directory is listed.<\/p>\n<p align=\"left\"><a title=\"4C\" name=\"4C\"><\/a><strong>Set the DOS Prompt<\/strong><br \/>\nYou can set or change the standard system prompt to display the name of the directory or subdirectory you are currently working in.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>prompt $p $g <\/strong>and press <strong>return.<\/strong><br \/>\n2. The DOS prompt tells you that you are working in the C directory (drive) and in the Info subdirectory.<br \/>\n3. Type: <strong>dir <\/strong>and press<strong> return.<\/strong><br \/>\n4. The single dot stands for the current directory. The double dots stand for the parent directory (root). The dots are often referred to as place markers.<\/p>\n<p align=\"left\"><a title=\"4D\" name=\"4D\"><\/a><strong>Move to the Parent Directory<\/strong><br \/>\nDOS has a quick way to move from the current directory back to the parent directory.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>cd.. <\/strong>and press <strong>return.<\/strong><br \/>\n2. You will return back to the C:\\&gt; prompt.<br \/>\n<a title=\"4E\" name=\"4E\"><\/a><strong>Copy a File into a Subdirectory<\/strong><br \/>\nThe <strong>COPY<\/strong> command lets you copy files from one directory to another.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>copy sales.bob \\info<\/strong> and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir \\info <\/strong>and press <strong>return.<\/strong><br \/>\n3. Notice that a copy of Sales.bob is copied into the subdirectory Info. The original file is also in the root directory.<\/p>\n<p align=\"left\"><a title=\"4F\" name=\"4F\"><\/a><strong>Copy a Group of Files into a Subdirectory<\/strong><br \/>\nWhen copying a group of files from the root directory into a subdirectory, it is necessary to use the wildcard character <strong>*<\/strong> along with the <strong>COPY<\/strong> command.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>copy quick.* \\info <\/strong>and press<strong> return.<\/strong><br \/>\n2. DOS will list the files being copied.<br \/>\n3. Type: <strong>dir \\info <\/strong>and press <strong>return.<\/strong><br \/>\n4. Three files should be listed in the Info subdirectory.<br \/>\n<strong>List Files in a Subdirectory<\/strong><br \/>\nThe <strong>CHANGE DIRECTORY<\/strong>, a.k.a.<strong> CD<\/strong>, command will let you list files in your subdirectory from your hard drive.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>cd \\info <\/strong>and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir <\/strong>and press <strong>return.<\/strong><br \/>\n3. All files in the Info subdirectory are listed.<\/p>\n<p align=\"left\"><a title=\"4G\" name=\"4G\"><\/a><strong>List Files in the Root from a Subdirectory<\/strong><br \/>\nThe <strong>DIRECTORY<\/strong> command is also used to get a listing of all the files in the root directory while in a subdirectory. The backslash character <strong>\\ <\/strong>represents the root directory.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir \\ <\/strong>and press <strong>return.<\/strong><br \/>\n2. All the files in the root directory are listed.<\/p>\n<p align=\"left\"><a title=\"4H\" name=\"4H\"><\/a><strong>Select the Directory List<\/strong><br \/>\nTo look for a specific filename extension, you can use the <strong>SELECTED DIRECTORY<\/strong> command.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir \\*.bat <\/strong>and press<strong> return.<\/strong><br \/>\n2. Only the files with the<strong> .bat<\/strong> extensions are listed.<br \/>\n3. Press the F3 key.<br \/>\n4. <strong>Backspace three times.<\/strong><br \/>\n5. Type: <strong>sys <\/strong>and press return.<br \/>\n6. Now only the files with the <strong>.sys<\/strong> extensions are listed.<\/p>\n<p align=\"left\"><a title=\"4I\" name=\"4I\"><\/a><strong>List Subdirectories<\/strong><br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>dir \\*.<\/strong> and press <strong>return.<\/strong><br \/>\n2. All the subdirectories are listed.<br \/>\n<strong>NOTE:<\/strong> The backslash character <strong>\\ <\/strong>directs DOS to read from the root directory. The <strong>*. <\/strong>requests the listing of the subdirectories.<\/p>\n<p align=\"left\"><a title=\"5A\" name=\"5A\"><\/a><strong>Delete a Single File<\/strong><br \/>\nPeriodically it is a good idea to delete files from the hard disk which are no longer needed or used. DOS makes it easy to remove these files with the <strong>DELETE<\/strong> command, a.k.a. <strong>DEL<\/strong>.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>cd.. <\/strong>and press <strong>return.<\/strong><br \/>\n2. The prompt shows you that you are back in the root directory.<br \/>\n3. Type: <strong>del sales.bob<\/strong> and press <strong>return.<\/strong><br \/>\n4. Type: <strong>dir Sales.bob<\/strong> and press <strong>return.<\/strong><br \/>\n5. Sales.bob is no longer listed because it has been deleted.<\/p>\n<p align=\"left\"><a title=\"5B\" name=\"5B\"><\/a><strong>Delete a Group of Files<\/strong><br \/>\nBy using the wildcard character<strong> *<\/strong> you can delete a group of files from you hard drive.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>del quick.* <\/strong>and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir quick.* <\/strong>and press <strong>return.<\/strong><br \/>\n3. All Quick files have been deleted.<\/p>\n<p align=\"left\"><a title=\"5C\" name=\"5C\"><\/a><strong>Delete all Files in a Subdirectory<\/strong><br \/>\nThere are two rules you will need to follow before removing a subdirectory.<br \/>\n<strong>RULE 1:<\/strong> All files in the subdirectory must be deleted.<br \/>\n<strong>NOTE: Never type DEL *.* when you are in the root directory.<\/strong> It will destroy all DOS files that are necessary to boot and operate the computer.<br \/>\n<u>Directions: <\/u><br \/>\n1. Type: <strong>cd \\info <\/strong>and press <strong>return.<\/strong><br \/>\n2. Type: <strong>dir<\/strong> and <strong>press return<\/strong>.<br \/>\n3. Three files should be listed.<br \/>\n4. Type: <strong>del *.*<\/strong> and press<strong> return.<\/strong><br \/>\n5. DOS will ask you if you are sure? (Y\/N)<br \/>\n6. Type: <strong>Y<\/strong> and <strong>press enter<\/strong>.<br \/>\nNow that your subdirectory is empty, you can delete the subdirectory (see rule 2 below).<\/p>\n<p align=\"left\"><a title=\"5D\" name=\"5D\"><\/a><strong><u>Remove a Subdirectory<\/u><\/strong><br \/>\n<strong>RULE 2:<\/strong> You cannot be in the subdirectory that you wish to remove. You will need to return to the root directory (C:\\&gt; prompt).<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>cd.. <\/strong>and press <strong>return.<\/strong><br \/>\n2. You should be back in the root directory.<br \/>\n3. Type: <strong>rd \\info <\/strong>and press<strong> return.<\/strong><br \/>\n4. Type: <strong>dir *. <\/strong>and press <strong>return.<\/strong><br \/>\n5. Notice that the Info subdirectory is no longer listed.<\/p>\n<p align=\"left\"><a title=\"6A\" name=\"6A\"><\/a><strong>Format a Floppy Disk<\/strong><br \/>\nBefore you can use a disk, you must format it.<br \/>\n<u>Directions<\/u>:<br \/>\n1. At the C:\\&gt; prompt type: <strong>format a:<\/strong><br \/>\n2. The A drive will be the drive that you insert your disk into; hence, the a: after the Format command and press <strong>return.<\/strong><br \/>\n3. You will be prompted with the message: &#8220;Insert new diskette for drive A: and press enter when ready.&#8221;<br \/>\n4. Now insert the disk you wish to format and press <strong>return.<\/strong><br \/>\n5. Once this formatting process is done, the following message will appear: &#8220;Format Completed.&#8221; Then you will be prompted for a volume label. Simply <strong>press return again.<\/strong><br \/>\n6. Now you will be asked if you would like to format another disk (Y\/N)? Press <strong>N<\/strong>.<br \/>\n<strong>NOTE:<\/strong> If you receive a message like: &#8220;Track 0 bad&#8221; or &#8220;Disk unusable,&#8221; your disk may be the wrong capacity. You can get help with this error message by typing:<br \/>\n<strong>Help Format<\/strong>.<\/p>\n<p align=\"left\"><a title=\"6B\" name=\"6B\"><\/a><strong>Change the Default Drive<\/strong><br \/>\nTo change from your hard drive to a floppy drive, you will need to indicate this change as follows:<br \/>\n<u>Directions:<\/u><br \/>\n1. Put a floppy disk into drive A.<br \/>\n2. Type: <strong>a: <\/strong>and press <strong>return.<\/strong><br \/>\n3. Your prompt should change to <strong>A:\\&gt;<\/strong><br \/>\n4. Type: <strong>dir<\/strong> and press<strong> return<\/strong>.<br \/>\n5. You are now able to see all the files on the floppy.<br \/>\n6. To change back to your hard drive, you will need to reverse this procedure.<br \/>\n7. Type: <strong>c:<\/strong> and press<strong> return. <\/strong>Now your prompt should be C:\\&gt;<\/p>\n<p align=\"left\"><a title=\"6C\" name=\"6C\"><\/a><strong>Diskcopy Command<\/strong><br \/>\nSometimes there is a need to copy all the files on one floppy diskette to another floppy. First you will need a blank formatted disk (refer to section on formatting disks.)<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>diskcopy a: a: <\/strong>and press<strong> return.<\/strong><br \/>\n2. When asked to put in the source disk, put in the diskette that has the information you want to copy into drive <strong>A <\/strong>and press <strong>return.<\/strong><br \/>\n3. Wait a few seconds. When asked to insert a target disk, take out the diskette from drive A and insert the blank floppy disk and press <strong>return.<\/strong><br \/>\n4. Once this process is complete, you will be prompted to write to another duplicate diskette (Y\/N). Press <strong>N.<\/strong><br \/>\n5. Then you will be prompted to copy another disk (Y\/N)? Press <strong>N<\/strong>.<br \/>\nNOTE: If your machine has two floppy disk drives, insert the original (source) disk into drive A and the blank (target) disk into drive B. Then type: <strong>DISKCOPY A: B:<\/strong><\/p>\n<p align=\"left\"><a title=\"6D\" name=\"6D\"><\/a><strong>Copying a File from the Hard Drive to a Floppy Disk<\/strong><br \/>\nSometimes there is a need to copy a file from the hard drive onto a floppy disk. This is helpful if you would like to have an extra copy of a certain file as a backup or to transport the copied file to another computer.<br \/>\n<u>Directions:<\/u><br \/>\n1. Type: <strong>copy a: <\/strong>and press <strong>return.<\/strong><br \/>\n2. Wait for a few seconds, notice the red light on the floppy drive. Never attempt to remove a disk from the disk drive while this red light is on.<br \/>\n3. To check to see if the file was copied, type <strong>a:<\/strong> at the C:\\&gt; prompt and press<strong> return.<\/strong><br \/>\n4. Type: <strong>dir<\/strong> and press<strong> return.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DOS TUTORIAL : THE BASICS Compilation by Lisa Lemieux, UC Call Center Table of Contents I. Lesson 1 \u00a0 A. Hardware and Software differences. B. What is DOS? \u00a0 C. Why You Need DOS. \u00a0 D. Set the Date and Time. \u00a0 E. Check the Date and Time. II. Lesson 2 \u00a0 A. Directory Command&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":4002,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[49],"tags":[3014,3019,3009,3011,3013,3012,3017,3016,3010,3015,3018,213],"class_list":["post-114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","tag-basic-dos-guide","tag-disk-operating-system","tag-dos","tag-dos-guide","tag-dos-learning-references","tag-dos-learning-resources","tag-dos-lessions","tag-dos-practice","tag-dos-tutorials","tag-learn-dos","tag-ms-dos","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":4004,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions\/4004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/4002"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}