MS-DOS Batch Fun

by will421 in Circuits > Computers

19104 Views, 9 Favorites, 0 Comments

MS-DOS Batch Fun

msdosbatchpic.png
Hello everyone! We are going to see the secrets and workings of MS-DOS!

Commands, Commands, Commands.

msdosbatchpic.png
Here is a GREAT link for commands

BATCH FILES! Yay!

msdosbatchpic.png
"But... what if I want to run a LOT of commands repeatly without getting tired?" You say. Well... that`s were BATCH files come in. Let`s do a run-down of batch files, I don`t mind if you build off them, if, IF you give me credit for the original batch.

Crazy Cmd

msdosbatchpic.png
Number #1: CrAzY cmd

@echo off
title Cmd.exe
color 0F
:top
set /p UI=c:/.
echo %RANDOM%%UI%%RANDOM%
%RANDOM%
GOTO top

save as Cmd.bat
if you`re not using Wine replace c:/. with c:/>
For some thing crazy to happen type >>CMD.BAT || or >CMD.BAT ||

MyCMD

msdosbatchpic.png
number #2 : MyCMD

:start ::this is optional onless you know you will want to reset with goto start.
@echo off
color 0a
title MyCMD
echo Welcome.
:Top
echo.
set /p command= ::Your prompt here.
%command%
goto Top

Crazy Nethack

msdosbatchpic.png
#3: Annoying NetHack
You ever heard of the console(CMD, BASH, SH, etc.) game NetHack?
This batch can(And will.) annoy any Windows newbie swapping from Linux.
Note:Place in System32 or it won`t work.

@echo off
cls
title Error
:top
echo FATAL ERROR:
echo Your operating system is not supported
echo Version:
ver
GOTO top

Save as nethack.bat

Some Hacks I Found Out.

msdosbatchpic.png

How to get back to the directory that the batch file is in no matter where it is!:

CD %~dp0

How to loop for a preset amount of times:

set /a loopvar=10
:: ^How many times to loop.
:loop
::Replace ECHO %loopvar% with your commands
echo %loopvar%
if %loopvar% EQU 1 (
goto endloop
) ELSE (
goto loop)


Done, Already??

Binary.jpg
Yep, we are done.