Enter the following DOS commands, and record or describe what is displayed. –ver -mem [ four kinds of memory should be shown. Project : find out what each type is. ] -vol [ for this one, after entering it once, change drives and enter it again. What has changed? ] -cls Choose a file name (eg: "dirlist.txt") and redirect the "dir" command to it. From the last lab, you will recall that this can be done with the ">" key. So, enter "dir > dirlist.txt", (or whatever file name you have chosen), without the quotes. Look at the file using either "type" or a text editor. Record what it contains. After completing the previous paragraph, enter "dir >> dirlist.txt", substituting whatever file name you used. Now examine the file again. What happened.? Now enter the command "del dirlist.txt", substituting whatever file name you used. Try to view the file again. What happened? The asterisk character "*" is used as a wild card in DOS commands. Try typing the following three commands, and observe what happens with each. 1): "dir *.txt" 2): "dir *.exe" 3): "dir *.com" Create a batch file “testdos.bat” and type the following: echo off cls echo my name is whatever-your-name-is echo This System is running under: ver Now, at the DOS prompt, enter "testdos". What do you see on the screen? From the DOS C:\> prompt (typical configuration assumed!), enter the following EXACTLY: Dir *.bak If there is no file shown called "autoexc1.bak", then enter EXACTLY Copy autoexec.bat autoexc1.bak This will make a backup copy of your existing autoexec.bat file. The second file, with the extension ".bak" is the copy. (If it did show in the directory when you typed "dir" first, use another name.) Now load "autoexec.bat" into a text editor. DO NOT CHANGE ANYTHING! Go back to windows, and click "Start" > "Run". Enter "Sysedit" into the dialogue box. You will see a number of smaller windows, each with a separate text file, including one with "autoexec.bat". DO NOT CHANGE ANYTHING IN THESE WINDOWS! After seeing how commands are written, close all the windows using the "X" in the upper right hand corner. Goto My Documents folder in D drive. Create a directory structure as given below: Sales Employee North South Admin Academic N1 N2 N3 S1 S2 A1 A2 AC1 AC2 AC3 Change your working directory to List all files and directories in your current directory. Open Academic directory. Copy all files from North directory to the current directory. Delete all files starting with N. (i.e. all file you copied just now). Rename the file S1 to South1 and S2 to South2. Open North directory. Move file A1 to directory in the name “Admin1”. Copy the file AC2 to South directory in the name “Academic2”. Create batch file “first.bat” that greets you with the message “Welcome ” and displays the system’s date and time and finally displays the version of the operating system you use. Run the above batch file at command line and note down the output. What you should do to run “first.bat” batch file automatically when you on the system.
- Enter the following DOS commands, and record or describe what is displayed.
–ver
-mem [ four kinds of memory should be shown. Project : find out what each type is. ]
-vol [ for this one, after entering it once, change drives and enter it again. What has changed? ]
-cls
- Choose a file name (eg: "dirlist.txt") and redirect the "dir" command to it. From the last lab, you will recall that this can be done with the ">" key. So, enter "dir > dirlist.txt", (or whatever file name you have chosen), without the quotes. Look at the file using either "type" or a text editor. Record what it contains.
After completing the previous paragraph, enter "dir >> dirlist.txt", substituting whatever file name you used. Now examine the file again. What happened.?
Now enter the command "del dirlist.txt", substituting whatever file name you used. Try to view the file again. What happened?
- The asterisk character "*" is used as a wild card in DOS commands. Try typing the following three commands, and observe what happens with each. 1): "dir *.txt" 2): "dir *.exe" 3): "dir *.com"
- Create a batch file “testdos.bat” and type the following:
echo off
cls
echo my name is whatever-your-name-is
echo This System is running under:
ver
Now, at the DOS prompt, enter "testdos". What do you see on the screen?
- From the DOS C:\> prompt (typical configuration assumed!), enter the following EXACTLY:
- Dir *.bak
If there is no file shown called "autoexc1.bak", then enter EXACTLY
- Copy autoexec.bat autoexc1.bak
This will make a backup copy of your existing autoexec.bat file. The second file, with the extension ".bak" is the copy. (If it did show in the directory when you typed "dir" first, use another name.)
Now load "autoexec.bat" into a text editor. DO NOT CHANGE ANYTHING!
Go back to windows, and click "Start" > "Run". Enter "Sysedit" into the dialogue box. You will see a number of smaller windows, each with a separate text file, including one with "autoexec.bat". DO NOT CHANGE ANYTHING IN THESE WINDOWS! After seeing how commands are written, close all the windows using the "X" in the upper right hand corner.
- Goto My Documents folder in D drive. Create a directory structure as given below:
<your name>
Sales Employee
North South Admin Academic
N1 N2 N3 S1 S2 A1 A2 AC1 AC2 AC3
- Change your working directory to <your name>
- List all files and directories in your current directory.
- Open Academic directory.
- Copy all files from North directory to the current directory.
- Delete all files starting with N. (i.e. all file you copied just now).
- Rename the file S1 to South1 and S2 to South2.
- Open North directory.
- Move file A1 to <your name> directory in the name “Admin1”.
- Copy the file AC2 to South directory in the name “Academic2”.
- Create batch file “first.bat” that greets you with the message “Welcome <your name>” and displays the system’s date and time and finally displays the version of the
operating system you use.
- Run the above batch file at command line and note down the output.
- What you should do to run “first.bat” batch file automatically when you on the system.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images