Jump to content

What is your favorite Batch file / scrept?

IBM_THINKPAD_R51

 @Echo off
 :Start2
 cls
 goto Start
 :Start
 title Password Generator
 echo I will make you a new password.
 echo Please write the password down somewhere in case you forget it.
 echo ----------------------------------------­-----------------------
 echo 1) 1 Random Password
 echo 2) 5 Random Passwords
 echo 3) 10 Random Passwords
 echo Input your choice
 set input=
 set /p input= Choice:
 if %input%==1 goto A if NOT goto Start2
 if %input%==2 goto B if NOT goto Start2
 if %input%==3 goto C if NOT goto Start2
 :A
 cls
 echo Your password is %random%
 echo Now choose what you want to do.
 echo 1) Go back to the beginning
 echo 2) Exit
 set input=
 set /p input= Choice:
 if %input%==1 goto Start2 if NOT goto Start 2
 if %input%==2 goto Exit if NOT goto Start 2
 :Exit
 exit
 :B
 cls
 echo Your 5 passwords are %random%, %random%, %random%, %random%, %random%.
 echo Now choose what you want to do.
 echo 1) Go back to the beginning
 echo 2) Exit
 set input=
 set /p input= Choice:
 if %input%==1 goto Start2 if NOT goto Start 2
 if %input%==2 goto Exit if NOT goto Start 2
 :C
 cls
 echo Your 10 Passwords are %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%
 echo Now choose what you want to do.
 echo 1) Go back to the beginning
 echo 2) Exit
 set input=
 set /p input= Choice:
 if %input%==1 goto Start2 if NOT goto Start 2
 if %input%==2 goto Exit if NOT goto Start 2​

 

 

 

NOTE:

 

Put this in notepad and save it as NumberGen.bat

 

The file extension " .bat "  is very important.

Link to comment
Share on other sites

Link to post
Share on other sites

@Echo off

echo YOU COMPUTER HAS BEEN INFECTED BY A VIRUS

echo DELETING ALL FILES

:loop

dir/s

goto loop

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

i thoght choice was no longer implemented in modern versions of windows?

 

other than that, probably the "virus" i put on a school computer that just opens and closes itself infinitely. nothing harmful, just annoying.

Link to comment
Share on other sites

Link to post
Share on other sites

::Gather Search Stringecho "Enter Search String"set /p SearchString=::Find String on each drive and write to filefindstr /s /i /m "%SearchString%" H:\ *.* > C:\HOutput.txtfindstr /s /i /m "%SearchString%" C:\ *.* > C:\COutput.txt::CAT files into the final outputType C:\HOutput.txt C:\COutput.txt > C:\SearchOutput.txt

This is one of the few batch file requests that I've actually ended up using myself at some point.

Link to comment
Share on other sites

Link to post
Share on other sites

@Echo off

echo YOU COMPUTER HAS BEEN INFECTED BY A VIRUS

echo DELETING ALL FILES

cd \

:loop

dir/s

goto loop

 

I guess you want to cd to the root \ first.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×