Question

Completion is a screenshot of the batch file showing all of the steps to create the file system shown below.

Instructions Create a batch file clifilesystem.cmd using Notepad which performs the following steps to create the file system

1) Open Notepad to a blank document. 2) Using Figure 1 as a guide, create the file/directory structure on your Desktop. You w

Continue editing the clifilesystem.cmd with the following steps and testing your command in the CLI 10) Add the command to ma

Instructions Create a batch file clifilesystem.cmd using Notepad which performs the following steps to create the file system shown below. Also use a proper comment for each step before the command. Proof your work. Finally submit the clifilesystem.cmd file in Blackboard Figure 1. The clijfilesystem.cmd file system Work from Desktop unless using an absolute path Desktop NOS110 OS Labs Homework Linux Windows RedHat Win7 Ubuntu Win8 file1.txt file2.txt
1) Open Notepad to a blank document. 2) Using Figure 1 as a guide, create the file/directory structure on your Desktop. You will use commands such as ECHO OFF, PAUSE, cd, md, move, copy, ren, rmdir, etc. Add a comment before each command line to explain the step. (Comments begin with : or use rem) See page 362 to get started. Key the first four lines as in Lab Project 9.2 but switch to the Desktop instead of Documents 3) To create the file1.txt file use: echo I am in NOS 110 class> (include the path)file1.txt To create the file2.txt file use: echo I am in the M/W class > (include the path) file2.txt Open the Command Prompt. Run the batch file. Use the tree If command to check your results once you create the file system. This command gives you a diagram of the file system hierarchy. 4) 5) Save the file as clifilesystem.cmd to your Desktop. (Make sure that All files is listed as the file type at the bottom of the Save As dialog box.) Leave Notepad open. Add the command to move the Win7 subdirectory to the Windows subdirectory in your Notepad file. Use relative path) 6) Leave Notepad open and test the command in the CLI 7) Return to your Notepad file and add the command to move the Ubuntu subdirectory with all its content to Linux subdirectory. (This time use an absolute path: c:luserslyournameldesktop ..keep on going.) NOTE: If your user name has a space between the first and last name, include the text string in double quotation marks. 8) Test the command in the CLI 9) Use the tree If command to check your results
Continue editing the clifilesystem.cmd with the following steps and testing your command in the CLI 10) Add the command to make a copy of the file1.txt and put it in the Win7 subdirectory. (Use relative path) 11) Add the command to move the file2.txt to the Homework subdirectory. (Use absolute path) 12) Add the command to rename file1.txt in RedHat to yourfirstname.txt. (Use relative path) 13) Add the command to delete the entire Linux subdirectory and all its contents. (Use relative path) Use the command: rd /s 14) Complete the batch file by adding: ECHO Good job! All tasks completed PAUSE 15) Proof your batch file commands once again for any mistakes or syntax issues. Be sure that all comment lines have been added. Take a screenshot of your batch file. Make sure that all lines are visible. If necessary, maximize the window. Paste the screen shot in a Word document labeled student name WinCliLab2. Close Notepad.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

@echo off
rem this line will change the directory to desktop
cd "C:\Users\Administrator\Desktop\"

rem this will create directory and change to that directory
md NOS110
cd NOS110

rem cd .. will change back to previous state
md OS
md Labs
md Homework

cd OS
md Linux
md Windows

cd Linux

md RedHat
md Win7
cd ..

cd Windows

md Ubuntu
md Win8

cd ..
cd ..
cd ..

tree /F NOS110
rem this will create file1.txt with the echo given text with given path

echo I am in NOS 110 class > C:\Users\Administrator\Desktop\NOS110\OS\Linux\RedHat\file1.txt

echo i am in the M/W class > C:\Users\Administrator\Desktop\NOS110\OS\Windows\Win8\file2.txt

rem first we go that directory where Win7 lives and then move the directory
cd NOS110\OS\Linux
move Win7 ..\Windows

rem ../file.php (file is in the folder that is one level higher than the current directory)
rem ./file.php (the file is in the current folder. The same as just file.php)

rem first we go that directory where Ubuntu lives and then move the directory
cd NOS110\OS\Windows
move Ubuntu C:\Users\Administrator\Desktop\NOS110\OS\Linux

cd ..
cd ..
cd ..

tree /F NOS110

cd C:\Users\Administrator\Desktop\NOS110\OS\Linux\RedHat
copy file1 ..\Windows\Win7

cd C:\Users\Administrator\Desktop\NOS110\OS\Windows\Win8
move file2 C:\Users\Administrator\Desktop\NOS110\Homework

cd C:\Users\Administrator\Desktop\NOS110\OS\Linux\RedHat
rename file1 madhav.txt

cd C:\Users\Administrator\Desktop\NOS110\OS
rd /S Linux

Echo Good Job! All Task Completed
pause

Administrator: Command Prompt VS AC C:\Users\Administrator\Desktop>tree /? Graphically displays the folder structure of a dri

TED- RedHat File Home Share View New item OpenSelect al Copy path Easy access Select none Pin to Quick Copy Paste 回Paste shor

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)

Add a comment
Know the answer?
Add Answer to:
Completion is a screenshot of the batch file showing all of the steps to create the file system s...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 5.Create two files also called file file1 and file2 in testdir_2 Use the ls -lR to show you created the directories 6. Change the permission of the files in the directories below and show their permi...

    5.Create two files also called file file1 and file2 in testdir_2 Use the ls -lR to show you created the directories 6. Change the permission of the files in the directories below and show their permissions testdir/testdir_1/file1 where owner has read and execute permissions testdir/testdir_1/file2 where where owner has read, write and execute permissions. Group has read only permissions 7. Create a directory called newdir/newdir_1/newdir_2 copy the file testdir/testdir_1/file1 to this directory Change the permisions of the file to owner,...

  • Create a new file and create a hard link and a symbolic link to it. Use...

    Create a new file and create a hard link and a symbolic link to it. Use vim or redirection to add content of the original file, then use cat and wc to examine each of the two aliases that you created. How does the result prove or disprove that either alias is a copy of the original file? In your home directory create a hard link and a symbolic link to one of the commands that you know how to...

  • Question: Hands-On Project 3-3 Use a Batch File A file with a bat file extension is...

    Question: Hands-On Project 3-3 Use a Batch File A file with a bat file extension is called a batch file. Yo... Use a Batch File A file with a .bat file extension is called a batch file. You can use a batch file to execute a group of commands, sometimes called a script, from a command prompt. Do the following to learn to use a batch file: 1. Using a command prompt window, copy the files in your Documents folder...

  • Homework 1- Merge Files: 1. Design a class named MergeFiles 1 Three file names are passed...

    Homework 1- Merge Files: 1. Design a class named MergeFiles 1 Three file names are passed as command-line arguments to MergeFiles as follows: java MergeFiles filel file2 mergedFile II. MergeFiles reads names stored in files file and file2 III. Merges the two list of names into a single list IV. Sorts that single list V. Ignores repetitions VI. Writes the sorted, free-of-repetitions list to a new file named mergedFile.txt VII. The names in all three files are stored as one...

  • 19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can...

    19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can use thecommand to create empty a create b. make c touch d mu 21. Which command can be used to leave vi temporarily to access the command line? 22 If you execute the contents of filel are sorted and the results are stored in file2. a sort file1 -ofile2 b. sort file1 >file2 c sort filel -d file2 d sort filel filez field or...

  • Login to Suse Linux as root. Complete the task working as the root user. 1. What...

    Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...

  • [2] What happens when you try to create a hard link to a directory? [2] Create...

    [2] What happens when you try to create a hard link to a directory? [2] Create a new directory. In the new directory, create a new file. In the new directory, create a symbolic link to the new file with its relative path. Test that the link is really working by 'cat'ing the symbolic link. Use the mv command to move the symbolic link to another directory (either the parent or a new subdirectory. Will the symbolic link still work?...

  • b. echo Your file has been processed c. echo l; d. cp file /tmp 36. You...

    b. echo Your file has been processed c. echo l; d. cp file /tmp 36. You can use the command to start a program with an environment variable setting that is not part of your current environment. c. use d. env a. export b. set 37. The command displays a list of all environment variables defined in your current environment. c. use d. env a. export b. set he environment variable contains a list of directories on the Linux system...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • Windows operating system 1. Write a simple batch file named LastName Final.bat (where LastName is your...

    Windows operating system 1. Write a simple batch file named LastName Final.bat (where LastName is your own last name), which accomplishes the following: a Disable echo output b. Clear the screen c. Welcome the user with the following message (where current Date and curent Time is the computer's current date and current time, respectfully-these values should be output using a command line command, meaning do not type in the date or time into your batch file). A sample of this...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT