Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

A simple program to hide or unhide a file. - Batch Code Bank


A simple program to hide or unhide a file.
Hide or Unhide any file.
                @echo off
::: To Hide or Unhide all files, use *.*
color F0

:START
title Hide-A-File v1.5
cls

dir /O:N /P
echo.
echo.
echo.
echo.
echo.
echo ###########################################
echo #+++++++++++++++++++++++++++++++++++++++++#
echo #+---------------------------------------+#
echo #+-                                     -+#
echo #+-  1) Hide a file                     -+#
echo #+-  2) Unhide a file                   -+#
echo #+-  3) Change directories              -+#
echo #+-  4) Exit                            -+#
echo #+-                                     -+#
echo #+---------------------------------------+#
echo #+++++++++++++++++++++++++++++++++++++++++#
echo ###########################################
echo.

set /p choice1=">>> "

if %choice1%==1 GOTO HIDE
if %choice1%==2 GOTO UNHIDE
if %choice1%==3 GOTO CHANGEDIR
if %choice1%==4 GOTO END

:HIDE
title Hide-A-File
cls

dir /O:N /P
echo.
echo.
echo.
echo.
echo.
set /p hide_file=Filename: 
attrib +r +a +s +h "%hide_file%"

cls
dir /O:N /P
echo.
echo.
echo.
echo.
echo.
echo ###########################################
echo #+++++++++++++++++++++++++++++++++++++++++#
echo #+---------------------------------------+#
echo #+-                                     -+#
echo #+-  1) Hide another file               -+#
echo #+-  2) Go back to the main menu        -+#
echo #+-  3) Exit                            -+#
echo #+-                                     -+#
echo #+---------------------------------------+#
echo #+++++++++++++++++++++++++++++++++++++++++#
echo ###########################################
echo.
set /p choice2=">>> "

if %choice2%==1 GOTO HIDE
if %choice2%==2 GOTO START
if %choice2%==3 GOTO END

:UNHIDE
title Unhide-A-File
cls

dir /O:N /P
echo.
echo.
echo.
echo.
echo.
set /p unhide_file=Filename: 
attrib -r -a -s -h "%unhide_file%"

cls
dir /O:N /P
echo.
echo.
echo.
echo.
echo.
echo ###########################################
echo #+++++++++++++++++++++++++++++++++++++++++#
echo #+---------------------------------------+#
echo #+-                                     -+#
echo #+-  1) Unhide another file             -+#
echo #+-  2) Go back to the main menu        -+#
echo #+-  3) Exit                            -+#
echo #+-                                     -+#
echo #+---------------------------------------+#
echo #+++++++++++++++++++++++++++++++++++++++++#
echo ###########################################
echo.
set /p choice3=">>> "

if %choice3%==1 GOTO UNHIDE
if %choice3%==2 GOTO START
if %choice3%==3 GOTO END

:CHANGEDIR
title Change Directories
cls
dir /O:N /P
echo.
echo.
echo.
echo.
echo.
set /p directory="DIR: "
cd %directory%

cls
dir /O:N /P
echo.
echo.
echo.
echo.
echo.
echo ###########################################
echo #+++++++++++++++++++++++++++++++++++++++++#
echo #+---------------------------------------+#
echo #+-                                     -+#
echo #+-  1) Change to a different directory -+#
echo #+-  2) Go back to the main menu        -+#
echo #+-  3) Exit                            -+#
echo #+-                                     -+#
echo #+---------------------------------------+#
echo #+++++++++++++++++++++++++++++++++++++++++#
echo ###########################################
echo.
set /p choice4=">>> "

if %choice4%==1 GOTO CHANGEDIR
if %choice4%==2 GOTO START
if %choice4%==3 GOTO END

:END
exit
            
Comments
ellipsis's avatar
ellipsis 13 years ago

TotcoS was here.