Hi I am trying to do a pretty basic script to map a drive but I am having problems with the if error level = command
It takes you to the Error page not matter what the outcome is. My script is below.
Echo **** his script will map a network drive for you ****
Echo **** Please Enter the Valid information ****
Set /P DRIVE="Please Enter the Drive letter here:"
Set /P PATH="Please Enter the Path here:"
Echo **** Maping the Drive ****
net use %DRIVE%: %PATH%
If %ErrorLevel% equ 1 (Goto :Finish Else (Goto :Error)
Echo **** An Error has Occured Please make sure you selected a valid free drive letter and a the path you selected is correct. ****
Echo **** This Operation has Finished Succesfuly ****