Windows 10 Help with creating Batch files. My instructor is no help.

jpriley

New Member
Joined
Jul 18, 2018
I'm having to create a set of batch files for a class. My instructor is no help. I have included the assignment. Is there anyone out there who can help me?

1. Create a batch file called DD.BAT. This batch file should display the files on the root of the HOMEWORK drive in date order with the most current date displayed first, and should pause so that the user may view the display one screen at a time.

2. Document DD.BAT. Remember to include your name, the name of the batch file, and then date as part of the documentation.

3. Create a batch file called SD.BAT that will display subdirectories only, in order by name, on the root of the S drive. (Use the TREE command)

4. Document the batch file. Remember to include your name, the name of the batch file, and then date as part of the documentation.

5. Create a batch file that will list the directory on the H: drive, shows you all hidden files on the S: drive and then deletes all .txt files on the E: drive. Be sure to name the batch file something appropriate and document it fully.

6. Create a batch file that will look for all instances of “or” in the all.spt file on the H: drive, then sorts in reverse alphabetical order and saves this list in a file called Teams.TMS under the sports folder.

Name the batch file or.bat and document it fully.

7. Copy all files with the .TXT extension from the WUGXP subdirectory to the root directory of the H drive. (Overwrite existing files.)

8. Create a batch file named EXTRA.BAT that will do the following:

  • Clear the screen
  • Display the root directory the H drive for any file that has .TXT as a file extension
  • Make a copy of the file called BORN.TXT and call the copy BIRTH.STR.
  • Give the user time to read the file.
  • Erase the file called BIRTH.STR

9. Document the batch file. Remember to include your name, the name of the batch file, and then date as part of the documentation.
 
  1. This would just be the DIR command
  2. Adding comments involves using the REM directive before your text
  3. If I understand this correctly you want to give a path and you only want to not show the root path, you'd have to use a FOR statement based on a filtered DIR output and run TREE for each returned value
  4. Same as 2
  5. DIR for the first and second part, DEL to delete for the third part
  6. Would require the TYPE command, piping FINDSTR and SORT
  7. COPY or XCOPY for this
  8. Same commands used in different steps
  9. Same as 2
 
  1. This would just be the DIR command
  2. Adding comments involves using the REM directive before your text
  3. If I understand this correctly you want to give a path and you only want to not show the root path, you'd have to use a FOR statement based on a filtered DIR output and run TREE for each returned value
  4. Same as 2
  5. DIR for the first and second part, DEL to delete for the third part
  6. Would require the TYPE command, piping FINDSTR and SORT
  7. COPY or XCOPY for this
  8. Same commands used in different steps
  9. Same as 2
Thanks, but in all honesty you're basically speaking "Greek" to me. I have no idea what I am doing. The instructor I have just reads slides and then sits at her computer and gets snappy if you ask a question.
 
Back
Top Bottom