@echo off
:start
echo Choose a function:
echo (S) Show hidden file/folder
echo (H) Hide a file/folder
echo (SE) Show everything in a drive.
echo.

:function
set /p func=
if %func%==S goto showFiles
if %func%==H goto hideFiles
if %func%==SE goto showEverything
if not %func%==S (
echo Invalid input.
goto function
)

:showFiles
echo.
goto directory
:continue1
attrib -s -h -r "%ffDir%"
echo Success!
echo.
echo.
goto performAnother
pause
exit

:hideFiles
echo.
goto directory
:continue2
attrib +s +h +r "%ffDir%"
echo Success!
echo.
echo.
goto performAnother
pause
exit

:showEverything
echo.
echo Enter the drive letter you wish to show everything.
set /p drive=
%drive%:
attrib -s -h -r /s /d
echo Done.
echo.
echo.
goto performAnother
pause
exit

:directory
echo Enter the path of the file/folder
set /p ffDir=
if %func%==S goto continue1
if %func%==H goto continue2

:performAnother
echo Do you wish to perform another operation? (Y/N)
set /p choice=
if %choice%==Y goto start
:toExit
if %choice%==N goto exiting
if not %choice%==Y (
echo Invalid input. Try again.
goto performAnother
)

:exiting
echo Do you wish to exit now? (Y/N)
set /p choice2=
if %choice2%==Y exit
if %choice2%==N goto performAnother
if not %choice2%==Y (
echo Invalid input. Try again.
goto toExit
)