Question

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 (My Documents in Windows 7) to a folder named \Save on a USB flash drive. Don’t include subfolders in the copy.

2. Using Notepad, create a batch file named MyBatch.bat on the USB flash drive that contains the commands to do the following:

a. Create the C:\Data folder and a subfolder named C:\Data\Documents.

b. Copy all the files in your \Save folder to the C:\Data\Documents folder.

c. List the contents of the C:\Data\Documents folder.

3. Using a command prompt window, execute the MyBatch.bat file and fix any problems you see. What happens when you execute the batch file and the C:\Data\Documents folder already exists?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. XCOPY C:\Users\Mayank\Documents E:\Save /i

2. a. mkdir C:\Data\Documents

2. b, XCOPY E:\Save C:\Data\Documents /i

2. c, dir C:\Data\Documents

3 The batch file will replace the already created folder

Add a comment
Know the answer?
Add Answer to:
Question: Hands-On Project 3-3 Use a Batch File A file with a bat file extension is...
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
  • Completion is a screenshot of the batch file showing all of the steps to create the file system s...

    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 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...

  • 20. Write the DOS command to erase a file named FILEBILL which is stored in the...

    20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....

  • Create a Windows batch script. The batch script will contain the following: Ask the user interactively:...

    Create a Windows batch script. The batch script will contain the following: Ask the user interactively: Boot drive letter of the computer Computer name Computer Model Check to see if the boot drive in #1 exists with the folder newfolder (#1 above) If yes cd BootDrive\newfolder If no, make the directory BootDrive\newfolder Check to see if casefile.txt exists: If yes goto the label DONE Tell the user that data already exists in the newfolder folder and exit the program Output...

  • A File class object may refer to a data file or a directory. The IntelliJ project...

    A File class object may refer to a data file or a directory. The IntelliJ project Directory List Demo, discussed starting on page 8, shows how to get information about the contents of a directory using File class methods list() and listFle(). The IntelliJ project Create DirectoriesDemo, starting on page 10, shows how to make a set of directories using the File class method mkdir(). The IntelliJ project CopyFileDemoE has a method to copy a file. Your task is to...

  • Using Unix processes Submit a README file that lists the files you have submitted along with...

    Using Unix processes Submit a README file that lists the files you have submitted along with a one sentence explanation. Call it Prj1README. MakeCopy.c : Write a C program that makes a new copy of an existing file using system calls for file manipulation. The names of the two files and copy block sizes are to be specified as command line arguments. Open the source file in read only mode and destination file in read/write mode. ForkCopy.c : Write a...

  • Could you help me do the commands from nmber 16 to 21 For this assignment, you...

    Could you help me do the commands from nmber 16 to 21 For this assignment, you will: Unpack a tar archive. Change the unpacked files. Repack the files into a new tar archive. Turn in your new tar archive. Details Do not use an editor unless it specifically states to edit the file. By "editor" I mean vim, gedit, pico, etc. Despite its name, we don't consider sed to be an editor in this assignment, so you may use it...

  • C#: Create a file that contains your favorite movie quote. Use a text editor such as...

    C#: Create a file that contains your favorite movie quote. Use a text editor such as Notepad and save the file as Quote.txt. Copy the file contents and paste them into a word-processing program such as Word. Save the file as Quote.doc. Write console application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file's size, you can create a System.IO.FileInfo object using a statement such as...

  • e) In the context of Unix file system , what does "path" means? f) Write down...

    e) In the context of Unix file system , what does "path" means? f) Write down the absolute path for the main.cpp in the timeproj directory g)Write down the relative path from inside timeproj directory to the prgm1.cpp file h)Write down the Unix commands and key strokes needed to create a new sourcefile named time.cpp and then save it to disk using the pico editor. i) In Unix each file has three access modes, namely r,w, and x. 1) Write...

  • LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check...

    LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check the output) Display the command(s) used to do the following: create an empty file called history by using just a redirection operator. Verify and show. Show/verify all results (i.e., all commands and their corresponding outputs). Wait 1 minute or more and then display the command(s) used to do the following: change the timestamp on the history file you just created. Verify/display the change. Show/verify...

  • In notepad 4. Build a document containing the following: a. Place a heading at the top...

    In notepad 4. Build a document containing the following: a. Place a heading at the top center of the document in all capital letters containing: MY BACKGROUND b. In a paragraph containing complete sentences of correctly spelled words, please describe the following about yourself: (1) Where you were born (city, state, country) (2) What brought you to Middlesex County College (3) What you are studying at Middlesex County College (4) What you like to do in your spare time when...

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