SlideShare a Scribd company logo
1 of 1
Download to read offline
5) Create a batch file named hide.bat. The batch file must use the attrib command to hide files.
The file name(s) of the file(s) to be hidden must be passed to the batch file by the user at the time
the batch file is executed (parameters)
The batch file must be able to handle multiple parameters entered by the user. In other words, it
should allow the user to enter more than one file name. (i.e, Hide File1.txt file2.txt file3.txt)
You must use the SHIFT command and looping
You must include the logic that will allow the loop to end on its own when there are no parameters
left to process
You must include the logic that will display an error message if the user attempts to run the batch
file without entering a parameter
Messages must be appropriately formatted.
Before hiding the file the batch file should confirm that it exists. If the file doesnt exist, the attrib
command shouldnt be executed.
Two logs should be kept a hidden.log file and an error.log file. Each time a file is successfully
hidden, a message should be stored in the hidden.log file. The message must identify the file
name (including its absolute path) of the file that was successfully hidden. Each time a file is not
successfully hidden (because it didnt exist), a message should be stored in the error.log file. The
message must identify the file name of the file that didnt exist.
If either of the log files exist from a previous execution, they should be deleted before processing
the parameters. No messages should be displayed in regards to the deletion.
At the completion of the batch file, the content of each log file must be displayed on the screen
with an appropriate heading; i.e., The following files were hidden; The following files were not
hidden because they didnt exist. NO output should be displayed on the screen while the batch file
is running all output should be sent to the log files and each log files contents must be displayed
when the batch file ends. The log files should only be displayed if they exist.
After displaying the log files, they should NOT be deleted.
Before displaying each of the log files, make sure it exists; if it doesnt exist, dont display it.
If the user enters /? As a parameter, information help for the command should be presented. An
explanation of the purpose of the batch file as well as the commands syntax must be included in
the output. The message must look professional.
Sample Executions: Just as a heads up, when I test this batch file I first test it with all files that do
exist, then with all files that don't exist and then with a combination of both. This sample execution
includes a mix of files that exist and files that do not exist. I: >HIDE FILE1.TXT C: TEST.TXT
FILE3.TXT SAMPLE.TXT The fo1lowing files were hidden: I: Ifile1.txt I: Jile3.txt The fo1lowing files
were not hidden because they didn't exist: C: JTEST.TXT SAMPLE.TXT This sample execution
includes only files that exist. Note that it includes only that information. There is no 'heading'
regarding files that weren't found. Lastly, a sample execution including only files that do not exist.
Note that it includes only that information. There's no 'heading' regarding files that were hidden. I:
PHIDE FILE8.txt file9.txt c:file2. txt The following files were not hidden because they didn't exist:
FILE8,txt file9,txt c: file2.txt

More Related Content

Similar to 5 Create a batch file named hidebat The batch file must u.pdf

VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5YOGESH SINGH
 
File Management and manipulation in C++ Programming
File Management and manipulation in C++ ProgrammingFile Management and manipulation in C++ Programming
File Management and manipulation in C++ ProgrammingChereLemma2
 
Java Code Only- Thanks 1- java program using boolean operator or if el.pdf
Java Code Only- Thanks 1- java program using boolean operator or if el.pdfJava Code Only- Thanks 1- java program using boolean operator or if el.pdf
Java Code Only- Thanks 1- java program using boolean operator or if el.pdfaanyajoshi90
 
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdfEASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdfsudhakargeruganti
 
INput output stream in ccP Full Detail.pptx
INput output stream in ccP Full Detail.pptxINput output stream in ccP Full Detail.pptx
INput output stream in ccP Full Detail.pptxAssadLeo1
 
CHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is hereCHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is heresidbhat290907
 
Learn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems pptLearn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems pptgeethasenthil2706
 
csc1201_lecture13.ppt
csc1201_lecture13.pptcsc1201_lecture13.ppt
csc1201_lecture13.pptHEMAHEMS5
 

Similar to 5 Create a batch file named hidebat The batch file must u.pdf (20)

File Handling in C
File Handling in CFile Handling in C
File Handling in C
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Python-FileHandling.pptx
Python-FileHandling.pptxPython-FileHandling.pptx
Python-FileHandling.pptx
 
File handling C program
File handling C programFile handling C program
File handling C program
 
Filesin c++
Filesin c++Filesin c++
Filesin c++
 
data file handling
data file handlingdata file handling
data file handling
 
VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5
 
File Handling In C++
File Handling In C++File Handling In C++
File Handling In C++
 
Chapter - 5.pptx
Chapter - 5.pptxChapter - 5.pptx
Chapter - 5.pptx
 
File Management and manipulation in C++ Programming
File Management and manipulation in C++ ProgrammingFile Management and manipulation in C++ Programming
File Management and manipulation in C++ Programming
 
Java Code Only- Thanks 1- java program using boolean operator or if el.pdf
Java Code Only- Thanks 1- java program using boolean operator or if el.pdfJava Code Only- Thanks 1- java program using boolean operator or if el.pdf
Java Code Only- Thanks 1- java program using boolean operator or if el.pdf
 
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdfEASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
 
File Handling
File HandlingFile Handling
File Handling
 
File Handling
File HandlingFile Handling
File Handling
 
INput output stream in ccP Full Detail.pptx
INput output stream in ccP Full Detail.pptxINput output stream in ccP Full Detail.pptx
INput output stream in ccP Full Detail.pptx
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
CHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is hereCHAPTER 2 - FILE HANDLING-txtfile.pdf is here
CHAPTER 2 - FILE HANDLING-txtfile.pdf is here
 
Learn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems pptLearn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems ppt
 
csc1201_lecture13.ppt
csc1201_lecture13.pptcsc1201_lecture13.ppt
csc1201_lecture13.ppt
 
File handling
File handlingFile handling
File handling
 

More from kiraan007

retim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdf
retim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdfretim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdf
retim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdfkiraan007
 
True FalseExercise can always counter the ill effects of .pdf
True FalseExercise can always counter the ill effects of .pdfTrue FalseExercise can always counter the ill effects of .pdf
True FalseExercise can always counter the ill effects of .pdfkiraan007
 
which of the following microorganism would have a nucleus h.pdf
which of the following microorganism would have a nucleus h.pdfwhich of the following microorganism would have a nucleus h.pdf
which of the following microorganism would have a nucleus h.pdfkiraan007
 
Use unfoldr to implement the following Racket functions with.pdf
Use unfoldr to implement the following Racket functions with.pdfUse unfoldr to implement the following Racket functions with.pdf
Use unfoldr to implement the following Racket functions with.pdfkiraan007
 
Un protista es cualquier organismo que no es una planta un .pdf
Un protista es cualquier organismo que no es una planta un .pdfUn protista es cualquier organismo que no es una planta un .pdf
Un protista es cualquier organismo que no es una planta un .pdfkiraan007
 
What is tRNA charging Explain the process with figures Wha.pdf
What is tRNA charging Explain the process with figures Wha.pdfWhat is tRNA charging Explain the process with figures Wha.pdf
What is tRNA charging Explain the process with figures Wha.pdfkiraan007
 
The tree below shows the relationship between 4 species The.pdf
The tree below shows the relationship between 4 species The.pdfThe tree below shows the relationship between 4 species The.pdf
The tree below shows the relationship between 4 species The.pdfkiraan007
 
7 Discuss the reasons behind the export pessimism of the .pdf
7 Discuss the reasons behind the export pessimism of the .pdf7 Discuss the reasons behind the export pessimism of the .pdf
7 Discuss the reasons behind the export pessimism of the .pdfkiraan007
 
Draiman Corporation has bonds on the market with 145 years .pdf
Draiman Corporation has bonds on the market with 145 years .pdfDraiman Corporation has bonds on the market with 145 years .pdf
Draiman Corporation has bonds on the market with 145 years .pdfkiraan007
 
FucueE 1013 Pattern of tcour and deposition within canyons .pdf
FucueE 1013 Pattern of tcour and deposition within canyons .pdfFucueE 1013 Pattern of tcour and deposition within canyons .pdf
FucueE 1013 Pattern of tcour and deposition within canyons .pdfkiraan007
 
struct Movie stdstring title Movie.pdf
struct Movie      stdstring title               Movie.pdfstruct Movie      stdstring title               Movie.pdf
struct Movie stdstring title Movie.pdfkiraan007
 
Snflandrlm bir bilano a Kr ve temettlerin datlmam krl.pdf
Snflandrlm bir bilano   a Kr ve temettlerin datlmam krl.pdfSnflandrlm bir bilano   a Kr ve temettlerin datlmam krl.pdf
Snflandrlm bir bilano a Kr ve temettlerin datlmam krl.pdfkiraan007
 
Son zamanlarda pek ok kii devletin byk blmn zellet.pdf
Son zamanlarda pek ok kii devletin byk blmn zellet.pdfSon zamanlarda pek ok kii devletin byk blmn zellet.pdf
Son zamanlarda pek ok kii devletin byk blmn zellet.pdfkiraan007
 
4 Si una empresa no ha tenido un cambio significativo en su.pdf
4 Si una empresa no ha tenido un cambio significativo en su.pdf4 Si una empresa no ha tenido un cambio significativo en su.pdf
4 Si una empresa no ha tenido un cambio significativo en su.pdfkiraan007
 
Problem 1 Obtain and plot the Fourier transforms of the fol.pdf
Problem 1 Obtain and plot the Fourier transforms of the fol.pdfProblem 1 Obtain and plot the Fourier transforms of the fol.pdf
Problem 1 Obtain and plot the Fourier transforms of the fol.pdfkiraan007
 
Qu le dice el sistema de cuestionarios para clientes propu.pdf
Qu le dice el sistema de cuestionarios para clientes propu.pdfQu le dice el sistema de cuestionarios para clientes propu.pdf
Qu le dice el sistema de cuestionarios para clientes propu.pdfkiraan007
 
PZ087P146Z11PZ06PZ26.pdf
PZ087P146Z11PZ06PZ26.pdfPZ087P146Z11PZ06PZ26.pdf
PZ087P146Z11PZ06PZ26.pdfkiraan007
 
Pregunta 1 An no respondido Marcado de 100 Marcar pregu.pdf
Pregunta 1  An no respondido  Marcado de 100  Marcar pregu.pdfPregunta 1  An no respondido  Marcado de 100  Marcar pregu.pdf
Pregunta 1 An no respondido Marcado de 100 Marcar pregu.pdfkiraan007
 
1 Describe each of the following and particularly note the .pdf
1 Describe each of the following and particularly note the .pdf1 Describe each of the following and particularly note the .pdf
1 Describe each of the following and particularly note the .pdfkiraan007
 
Please use excel and show formulas xPXx1.pdf
Please use excel and show formulas xPXx1.pdfPlease use excel and show formulas xPXx1.pdf
Please use excel and show formulas xPXx1.pdfkiraan007
 

More from kiraan007 (20)

retim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdf
retim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdfretim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdf
retim ve Maliyet 2020 lkbaharnda COVID19 salgn ekonomi g.pdf
 
True FalseExercise can always counter the ill effects of .pdf
True FalseExercise can always counter the ill effects of .pdfTrue FalseExercise can always counter the ill effects of .pdf
True FalseExercise can always counter the ill effects of .pdf
 
which of the following microorganism would have a nucleus h.pdf
which of the following microorganism would have a nucleus h.pdfwhich of the following microorganism would have a nucleus h.pdf
which of the following microorganism would have a nucleus h.pdf
 
Use unfoldr to implement the following Racket functions with.pdf
Use unfoldr to implement the following Racket functions with.pdfUse unfoldr to implement the following Racket functions with.pdf
Use unfoldr to implement the following Racket functions with.pdf
 
Un protista es cualquier organismo que no es una planta un .pdf
Un protista es cualquier organismo que no es una planta un .pdfUn protista es cualquier organismo que no es una planta un .pdf
Un protista es cualquier organismo que no es una planta un .pdf
 
What is tRNA charging Explain the process with figures Wha.pdf
What is tRNA charging Explain the process with figures Wha.pdfWhat is tRNA charging Explain the process with figures Wha.pdf
What is tRNA charging Explain the process with figures Wha.pdf
 
The tree below shows the relationship between 4 species The.pdf
The tree below shows the relationship between 4 species The.pdfThe tree below shows the relationship between 4 species The.pdf
The tree below shows the relationship between 4 species The.pdf
 
7 Discuss the reasons behind the export pessimism of the .pdf
7 Discuss the reasons behind the export pessimism of the .pdf7 Discuss the reasons behind the export pessimism of the .pdf
7 Discuss the reasons behind the export pessimism of the .pdf
 
Draiman Corporation has bonds on the market with 145 years .pdf
Draiman Corporation has bonds on the market with 145 years .pdfDraiman Corporation has bonds on the market with 145 years .pdf
Draiman Corporation has bonds on the market with 145 years .pdf
 
FucueE 1013 Pattern of tcour and deposition within canyons .pdf
FucueE 1013 Pattern of tcour and deposition within canyons .pdfFucueE 1013 Pattern of tcour and deposition within canyons .pdf
FucueE 1013 Pattern of tcour and deposition within canyons .pdf
 
struct Movie stdstring title Movie.pdf
struct Movie      stdstring title               Movie.pdfstruct Movie      stdstring title               Movie.pdf
struct Movie stdstring title Movie.pdf
 
Snflandrlm bir bilano a Kr ve temettlerin datlmam krl.pdf
Snflandrlm bir bilano   a Kr ve temettlerin datlmam krl.pdfSnflandrlm bir bilano   a Kr ve temettlerin datlmam krl.pdf
Snflandrlm bir bilano a Kr ve temettlerin datlmam krl.pdf
 
Son zamanlarda pek ok kii devletin byk blmn zellet.pdf
Son zamanlarda pek ok kii devletin byk blmn zellet.pdfSon zamanlarda pek ok kii devletin byk blmn zellet.pdf
Son zamanlarda pek ok kii devletin byk blmn zellet.pdf
 
4 Si una empresa no ha tenido un cambio significativo en su.pdf
4 Si una empresa no ha tenido un cambio significativo en su.pdf4 Si una empresa no ha tenido un cambio significativo en su.pdf
4 Si una empresa no ha tenido un cambio significativo en su.pdf
 
Problem 1 Obtain and plot the Fourier transforms of the fol.pdf
Problem 1 Obtain and plot the Fourier transforms of the fol.pdfProblem 1 Obtain and plot the Fourier transforms of the fol.pdf
Problem 1 Obtain and plot the Fourier transforms of the fol.pdf
 
Qu le dice el sistema de cuestionarios para clientes propu.pdf
Qu le dice el sistema de cuestionarios para clientes propu.pdfQu le dice el sistema de cuestionarios para clientes propu.pdf
Qu le dice el sistema de cuestionarios para clientes propu.pdf
 
PZ087P146Z11PZ06PZ26.pdf
PZ087P146Z11PZ06PZ26.pdfPZ087P146Z11PZ06PZ26.pdf
PZ087P146Z11PZ06PZ26.pdf
 
Pregunta 1 An no respondido Marcado de 100 Marcar pregu.pdf
Pregunta 1  An no respondido  Marcado de 100  Marcar pregu.pdfPregunta 1  An no respondido  Marcado de 100  Marcar pregu.pdf
Pregunta 1 An no respondido Marcado de 100 Marcar pregu.pdf
 
1 Describe each of the following and particularly note the .pdf
1 Describe each of the following and particularly note the .pdf1 Describe each of the following and particularly note the .pdf
1 Describe each of the following and particularly note the .pdf
 
Please use excel and show formulas xPXx1.pdf
Please use excel and show formulas xPXx1.pdfPlease use excel and show formulas xPXx1.pdf
Please use excel and show formulas xPXx1.pdf
 

Recently uploaded

FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxCeline George
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsPallavi Parmar
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfNirmal Dwivedi
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 

Recently uploaded (20)

FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 

5 Create a batch file named hidebat The batch file must u.pdf

  • 1. 5) Create a batch file named hide.bat. The batch file must use the attrib command to hide files. The file name(s) of the file(s) to be hidden must be passed to the batch file by the user at the time the batch file is executed (parameters) The batch file must be able to handle multiple parameters entered by the user. In other words, it should allow the user to enter more than one file name. (i.e, Hide File1.txt file2.txt file3.txt) You must use the SHIFT command and looping You must include the logic that will allow the loop to end on its own when there are no parameters left to process You must include the logic that will display an error message if the user attempts to run the batch file without entering a parameter Messages must be appropriately formatted. Before hiding the file the batch file should confirm that it exists. If the file doesnt exist, the attrib command shouldnt be executed. Two logs should be kept a hidden.log file and an error.log file. Each time a file is successfully hidden, a message should be stored in the hidden.log file. The message must identify the file name (including its absolute path) of the file that was successfully hidden. Each time a file is not successfully hidden (because it didnt exist), a message should be stored in the error.log file. The message must identify the file name of the file that didnt exist. If either of the log files exist from a previous execution, they should be deleted before processing the parameters. No messages should be displayed in regards to the deletion. At the completion of the batch file, the content of each log file must be displayed on the screen with an appropriate heading; i.e., The following files were hidden; The following files were not hidden because they didnt exist. NO output should be displayed on the screen while the batch file is running all output should be sent to the log files and each log files contents must be displayed when the batch file ends. The log files should only be displayed if they exist. After displaying the log files, they should NOT be deleted. Before displaying each of the log files, make sure it exists; if it doesnt exist, dont display it. If the user enters /? As a parameter, information help for the command should be presented. An explanation of the purpose of the batch file as well as the commands syntax must be included in the output. The message must look professional. Sample Executions: Just as a heads up, when I test this batch file I first test it with all files that do exist, then with all files that don't exist and then with a combination of both. This sample execution includes a mix of files that exist and files that do not exist. I: >HIDE FILE1.TXT C: TEST.TXT FILE3.TXT SAMPLE.TXT The fo1lowing files were hidden: I: Ifile1.txt I: Jile3.txt The fo1lowing files were not hidden because they didn't exist: C: JTEST.TXT SAMPLE.TXT This sample execution includes only files that exist. Note that it includes only that information. There is no 'heading' regarding files that weren't found. Lastly, a sample execution including only files that do not exist. Note that it includes only that information. There's no 'heading' regarding files that were hidden. I: PHIDE FILE8.txt file9.txt c:file2. txt The following files were not hidden because they didn't exist: FILE8,txt file9,txt c: file2.txt