Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
this isnt a help post, its where you post batch programs you've made if you want to share them.
Rock, Paper, Scissors!@echo offset tp=starset uscore=0set cscore=0cls:startTitle Rock paper scissorsCOLOR f0clsecho.echo. Computer score = %cscore%echo. Your score = %uscore%echo.Echo. Pick and type either 'rock' 'paper' or 'scissors' and press EnterSet /p tp= :if %tp% equ rock set g=1if %tp% equ paper set g=2if %tp% equ scissors set g=3Set /a Number=(%Random% %%3)+1If %Number% equ 1 set h=rockIf %Number% equ 2 set h=paperIf %Number% equ 3 set h=scissorsif %h% equ rock set a=1if %h% equ paper set a=2if %h% equ scissors set a=3if %a% equ %g% goto tieif %a%%g% equ 13 goto lostif %a%%g% equ 21 goto lostif %a%%g% equ 32 goto lostif %a%%g% equ 12 goto winnerif %a%%g% equ 23 goto winnerif %a%%g% equ 31 goto winnerif /i %tp% EQU rosk ( Title WINNER! set /a uscore=%uscore%+1 cls echo. Echo. Your Guess was rock and I picked scissors. That meens you won! echo. echo. pause goto start)if /i %tp%==star goto :wtfnoelse ( :wtfno cls echo. echo. You didn't choose anything. echo. echo. Please type either 'rock' 'paper' or 'scissors' and echo. press Enter. echo. echo.Press any key to start playing again. . . pause > nul goto :start):winnerTitle WINNER!set /a uscore=%uscore%+1clsecho.Echo. Your Guess was %tp% and I picked %h%. That meens you won!echo.echo.pausegoto start: tieTitle TIEclsecho.Echo. Your Guess was %tp% and I picked %h%. That meens we tiedecho.echo.pausegoto start: lostTitle LOST!set /a cscore=%cscore%+1clsecho.Echo. You picked %tp% and I picked %H% so I won!echo.echo.pausegoto start
@echo offcolor f0cls@echo offsetlocaltitle Guessing Game Small Version :startggsclsset /A MyNumber="(%Random% %%1000) + 1"set /A NumGuess=0echo You have to guess a number in the range 1 to 1000echo I will for each guess tell you if the number is to smallecho or to large echo.:Nextggsset /P Guess="Enter a number> "set /A NumGuess+=1if %Guess% EQU %MyNumber% goto :Winggsif %Guess% LSS %MyNumber% echo Your number is to smallif %Guess% EQU 815 goto :winggsif %Guess% GTR %MyNumber% echo Your number is to largeif /I %guess%==back goto :1if %guess%==back goto :1goto :Nextggs:Winggsecho Congratulations you guessed the numer in %NumGuess% triesset /P Answer="Do you want to try again [y/n]> "if [%Answer%]==[y] goto :startggsif {%Answer%}=={n} goto :1
@echo off setlocal ENABLEDELAYEDEXPANSION Title Pascal's Triangle:Begin cls (set n=) set /p "n=Input (?? Lines) : " if not defined n goto :Begin (set /a nspace=n-1) (set temp_var=!nspace!) for /L %%a in (1,1,!n!) do ( for /L %%n in (1,1,!nspace!) do ( for /F "Delims=" %%s in ('echo. ') do <nul set /p "=%%s" ) (set /a nspace-=1) (set Bil[%%a][1]=1) (set Bil[%%a][%%a]=1) if %%a gtr 2 for /L %%x in (2,1,!temp_var!) do ( set /a "prev=%%a-1" set /a "prev_coloum=%%x-1" call set "temp_1=%%Bil[!prev!][!prev_coloum!]%%" call set "temp_2=%%Bil[!prev!][%%x]%%" set /a "Bil[%%a][%%x]=temp_1+temp_2" ) for /L %%b in (1,1,%%a) do <nul set /p "=!Bil[%%a][%%b]! " echo. ) pause>nul goto :Begin:END
@echo off mode 33,25 setlocal ENABLEDELAYEDEXPANSION Title Process Manager:Begin CD /D "!TEMP!" set "TASKLIST=%windir%\system32\tasklist.exe" set "FIND=%windir%\system32\find.exe" set "wmic=%windir%\System32\Wbem\wmic.exe" set "Explore=%windir%\explorer.exe":Reload cls set num=0 echo.________________________________ echo.[ Process Name ] [ PID ] echo.-------------------------------- if not defined NAME set NAME=%USERNAME% !TASKLIST! /FI "USERNAME eq !NAME!" /FO TABLE /NH >"plist.txt" for /f "tokens=*" %%a in (plist.txt) do ( set /a num+=1 set "list=%%a" set "list=!list:~0,32!" echo.!list!) echo.________________________________ Del /f /q "plist.txt" >nul 2>&1 Title !NAME! - [!num!] Process Running. if not defined ac ( if /i "!NAME!"=="%USERNAME%" goto :USR if /i "!NAME!"=="SYSTEM" goto :SYS ) if /i "!ac!"=="K" goto :Kill if /i "!ac!"=="S" goto :SYSTEM if /i "!ac!"=="U" goto :USER if /i "!ac!"=="E" goto :Explore set "ac=" GOTO :Reload:USER set "NAME=" set "ac=" GOTO :Reload :USR echo.CH : K=Kill, S=System, E=Explore set /p "ac=Action : " GOTO :Reload:SYSTEM set NAME=SYSTEM set "ac=" GOTO :Reload :SYS echo.CH : K=Kill, U=User, E=Explore set /p "ac=Action : " GOTO :Reload:Kill echo.Type PID to Kill.. set "ac=" set /p "PID=PID : " if not defined PID goto :Reload Taskkill /F /PID !PID! >nul 2>&1 if errorlevel 1 (echo.No Task Running w/ this PID.) else ( if !PID! geq 0 if !PID! lss 10 ( echo.Can't kill Critical Process goto :clr_var2 ) else ( echo.Success : Task with PID=!PID! echo. has been KILLED.. )) :clr_var2 set "ac=" set "PID=" PAUSE>NUL GOTO :Reload:Explore echo.Type PID to Explore.. set "ac=" set /p "PID=PID : " if not defined PID goto :Reload if !PID! lss 10 goto :clr_var if !PID! gtr 10000 goto :clr_var !wmic! process get ProcessID,ExecutablePath >"path.txt" for /f "tokens=1,2 delims= " %%a in ('type "path.txt" ^| !FIND! " !PID! "') do ( set "exepath=%%~dpa" ) if not defined exepath ( echo.No Task Running w/ this PID. PAUSE>NUL ) else (START !Explore! "!exepath!") :clr_var set "PID=" set "exepath=" Del /f /q "path.txt" >nul 2>&1 GOTO :Reload:END
explain it more coz i dont know what you mean with 'x'