Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with this script I created. I need

image text in transcribed

I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with this script I created.

I need to have the script confirm that the file exists before the batch file hides the file. If the file doesn't exist, the attrib command should not be executed.

Thanks!

hide.bat - Notepad File Edit Format View Help @ECHO off REM Batch File Name: Hide.bat :: Created By: Jake Dion :: The batch file will use the attrib command :: to hide files. The file name will be able to :: handle multiple parameters entered by the user allowing the user to enter more than one file :: name. The shift command and looping is required. IF "%1"=="" GOTO noparams : Loop IF "%1"=="" GOTO eof echo File %1 is being hidden attrib +h+ %1 SHIFT GOTO Loop :noparams echo Error: no file names given as parameters :eof hide.bat - Notepad File Edit Format View Help @ECHO off REM Batch File Name: Hide.bat :: Created By: Jake Dion :: The batch file will use the attrib command :: to hide files. The file name will be able to :: handle multiple parameters entered by the user allowing the user to enter more than one file :: name. The shift command and looping is required. IF "%1"=="" GOTO noparams : Loop IF "%1"=="" GOTO eof echo File %1 is being hidden attrib +h+ %1 SHIFT GOTO Loop :noparams echo Error: no file names given as parameters :eof

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions