this isnt a help post, its where you post batch programs you've made if you want to share them.
Rock, Paper, Scissors!
@echo off
set tp=star
set uscore=0
set cscore=0
cls
:start
Title Rock paper scissors
COLOR f0
cls
echo.
echo. Computer score = %cscore%
echo. Your score = %uscore%
echo.
Echo. Pick and type either 'rock' 'paper' or 'scissors' and press Enter
Set /p tp= :
if %tp% equ rock set g=1
if %tp% equ paper set g=2
if %tp% equ scissors set g=3
Set /a Number=(%Random% %%3)+1
If %Number% equ 1 set h=rock
If %Number% equ 2 set h=paper
If %Number% equ 3 set h=scissors
if %h% equ rock set a=1
if %h% equ paper set a=2
if %h% equ scissors set a=3
if %a% equ %g% goto tie
if %a%%g% equ 13 goto lost
if %a%%g% equ 21 goto lost
if %a%%g% equ 32 goto lost
if %a%%g% equ 12 goto winner
if %a%%g% equ 23 goto winner
if %a%%g% equ 31 goto winner
if /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 :wtfno
else (
: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
)
:winner
Title WINNER!
set /a uscore=%uscore%+1
cls
echo.
Echo. Your Guess was %tp% and I picked %h%. That meens you won!
echo.
echo.
pause
goto start
: tie
Title TIE
cls
echo.
Echo. Your Guess was %tp% and I picked %h%. That meens we tied
echo.
echo.
pause
goto start
: lost
Title LOST!
set /a cscore=%cscore%+1
cls
echo.
Echo. You picked %tp% and I picked %H% so I won!
echo.
echo.
pause
goto start
@echo off
color f0
cls
@echo off
setlocal
title Guessing Game Small Version
:startggs
cls
set /A MyNumber="(%Random% %%1000) + 1"
set /A NumGuess=0
echo You have to guess a number in the range 1 to 1000
echo I will for each guess tell you if the number is to small
echo or to large
echo.
:Nextggs
set /P Guess="Enter a number> "
set /A NumGuess+=1
if %Guess% EQU %MyNumber% goto :Winggs
if %Guess% LSS %MyNumber% echo Your number is to small
if %Guess% EQU 815 goto :winggs
if %Guess% GTR %MyNumber% echo Your number is to large
if /I %guess%==back goto :1
if %guess%==back goto :1
goto :Nextggs
:Winggs
echo Congratulations you guessed the numer in %NumGuess% tries
set /P Answer="Do you want to try again [y/n]> "
if [%Answer%]==[y] goto :startggs
if {%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
try that..@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'Where?
sorry i meant on that Move game you madeWah? ???
choice /C 12 >nul
tochoice /C:12 >nul
choice /C:daswnl /T 1 /D n >nul
choice.com & choice.exe for Windows NT/2000/XP
Waits for the user to choose one of a set of choices.
If the user presses a key that is not among the keys you assigned,
Choice sounds a warning beep.
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]
/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display
try this one choice /C:daswnl /T:n,1 >nul
http://www.zimm-co.com/PressTheSpaceBar/pressthespacebar2000.html
sori macdad i cant help im not familiar with batch programs threadDefinitely new here... ::)
hope i can help you next time
sori macdad i cant help im not familiar with batch programs threadDefinitely new here... ::)
hope i can help you next time
sori macdad i cant help im not familiar with batch programs thread
hope i can help you next time
Ok this continues off of the "i want to make a simple game in dos" thread. if you have some batch programs you would like to share and discuss about just post em in this thread. :)
sori macdad i cant help im not familiar with batch programs threadDefinitely new here... ::)
hope i can help you next time
A spammer with a "earn cash from the web" link in his sig.
Reported.
Lan Zeird, what would your "heroes", namely "My parents and Jesus" ::) think of your spamming of forums with useless pretend answers just so you can get people to look at your scam/spam link?
sori macdad i cant help im not familiar with batch programs thread
hope i can help you next time
Sorry, your browser must have been acting funny....which doesnt work.
Seems fine to me.... Just your average online money-making website....
oh NOW you tell me! I already sent half my savings!Sorry, your browser must have been acting funny....which doesnt work.
Seems fine to me.... Just your average online money-making website....
choice /C:wsdafjo >nul
it needed the colon cuz cmd was just flashing without the colon
::Batch file designed by Sky Ninja
@echo off
set base=none
set sec=none
color 1f
title SRB2 Level Name Generator
:start:
cls
set /a g=(%random% %%15)+1
if %g% equ 1 set base=Green
if %g% equ 2 set base=Glowing
if %g% equ 3 set base=Egg
if %g% equ 4 set base=Clover
if %g% equ 5 set base=Lunar
if %g% equ 6 set base=Radiant
if %g% equ 7 set base=Hidden
if %g% equ 8 set base=Flaming
if %g% equ 9 set base=Frozen
if %g% equ 10 set base=Dark
if %g% equ 11 set base=Sandy
if %g% equ 12 set base=Final
if %g% equ 13 set base=Lost
if %g% equ 14 set base=Fatal
if %g% equ 15 set base=Weapons
set /a h=(%random% %%10)+1
if %h% equ 1 set sec=Hill
if %h% equ 2 set sec=Shrine
if %h% equ 3 set sec=Factory
if %h% equ 4 set sec=Base
if %h% equ 5 set sec=City
if %h% equ 6 set sec=Field
if %h% equ 7 set sec=Dunes
if %h% equ 8 set sec=Mountain
if %h% equ 9 set sec=Core
if %h% equ 10 set sec=Attack
echo. Your level is...
echo %base% %sec% Zone>>"C:\Documents and Settings\%username%\My Documents\LevelNameGen.txt"
echo. %base% %sec% Zone
echo.
echo. Generate another? (y/n)
Set /p yn= :
if %yn% equ y goto start
if %yn% equ n exit
@echo off
mode con lines=20 cols=60
:start
cls
echo you are here: %CD%
echo.
echo.Up? -W
echo.Open? -A
echo.Search? -S
echo.Enter address? -D
echo.Quit -Q
echo.CMD? -Z
echo.rename? -R
echo.copy? -c
choice /c "WADQSRZC">Nul
if errorlevel 8 goto C
if errorlevel 7 goto Z
if errorlevel 6 goto R
if errorlevel 5 goto S
if errorlevel 4 goto Q
if errorlevel 3 goto D
if errorlevel 2 goto A
if errorlevel 1 goto W
echo error!!!
pause
exit
:C
echo.
set /p OR=what do you want to copy?
if "%OR%"=="back" goto start
set /p nom= where to?
copy %OR% %nom%
goto start
:D
echo.
set /p add=where do you want to go?
if "%add%"=="back" goto start
cd %add%
goto start
:W
cd..
goto start
:A
echo.
dir /a:-d /b
echo.
set /p add=what do you want to run?
if "%add%"=="back" goto start
start "" %add%
goto start
:Q
echo bye
exit
:S
set /p OR=where do you want to search?
if "%OR%"=="back" goto start
set /p add=what do you want to search for?
where /R %OR% "%add%"
pause
goto start
:R
set /p OR=what would you like to rename?
if "%OR%"=="back" goto start
set /p nom=rename to what?
ren %OR% %nom%
goto start
:Z
set /p add=%CD%^>
if "%add%"=="back" goto start
%add%
pause
goto start
... you want to see my 'thing'... usually i'd wait until after the first date but seeing as you asked so politely....lol :D
choice /C:wsdafjo >nul
for /F "delims=? skip=%nnum%" %%L in ('dir /B /A:D %cd%') do (
cd %%L
goto CD
)
" was unexpected at this time.
if %cnum% equ 1 (
for /F "delims=?" %%L in ('dir /B /A:D %cd%') do (
cd %%L
goto CD
)
)
toif %cnum% leq 1 (
for /F "delims=?" %%L in ('dir /B /A:D %cd%') do (
cd %%L
goto CD
)
)
Microsoft Windows 2000 and Windows XP users who have batch files that utilize the choice command should modify the batch file to use the MS-DOS set command.
Choice doesn't work on XP.QuoteMicrosoft Windows 2000 and Windows XP users who have batch files that utilize the choice command should modify the batch file to use the MS-DOS set command.
choice.exe [commands]
this isnt a help post, its where you post batch programs you've made if you want to share them.
echo downloading \\server\My_Uplink.exe
echo please wait 0%%
ping -n 2 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 4%%
ping -n 2 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 17%%
ping -n 3 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 24%%
ping -n 2 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 56%%
ping -n 4 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 61%%
ping -n 3 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 79%%
ping -n 3 127.0.0.1>Nul
cls
echo downloading \\server\My_Uplink.exe
echo please wait 100%%
ping -n 4 127.0.0.1>Nul
for %%C in (0 4 17 24 56 61 79 100) do (
echo downloading \\server\My_Uplink.exe
echo please wait %%C%%
ping -n 2 127.0.0.1>Nul
cls
)
@echo off
cmd
:LOOP
set /p cmd=%cd%>
%cmd%
goto LOOP
@echo off
cmd
:LOOP
set /p cmd=%cd%>
%cmd%
goto LOOP
HOLY CRAP!
Multiplayer game through FTP! Devcom 10/10! A++ it all works execept a. i wish i had another computer to play against. but o well! Execellent Work Dev!
Now it just needs to be updated to use TCP/IP!
are we still talking about batch?
I'm surprised it can even be used for games, since games are in general interactive and don't execute their commands in a batch.
This is the batch programs thread!u got me. I concede.
I don't suppose you remember the 1980-90's when almost all games were made for dos?If I recall correctly, those programs were written in "real" programming languages(usually a mix of ASM and C). Batch programs at that point in time where just that- they didn't have a lot of the constructs and such they have now (except of course for the for command, which has been expanded quite a lot since). Warranted, games could be constructed with batch, but even a simple guessing game required kludges- and since you couldn't perform numeric comparisons it became a bit difficult to add hints like "higher" and "lower" if desired.
@echo off
setlocal enableextensions
setlocal enabledelayedexpansion
set Sch_choice=,Google,Youtube,Yahoo,
set Sch=Google
:LOOP
echo.
echo.= Menu =================================================
echo.
for /f "tokens=1,2,* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo. %%B %%C
echo.
echo.========================================================
choice /C:12 >nul
set choice=%errorlevel%
call :menu_%choice%
GOTO LOOP
:menu_1 Search Type: '!Sch!' [!Sch_choice:~1,-1!]
call :NIL Sch "!Sch_choice!"
cls
GOTO :EOF
:menu_2 Search
call :Search "!Sch!"
cls
GOTO :EOF
:NIL
SETLOCAL
set lst=%~2
set dlm=%lst:~-1%
set old=!%~1!
set fst=
for /f "delims=%dlm%" %%a in ("%lst%") do set fst=%%a
set lll=!lst:%dlm%%old%%dlm%=%dlm%@%dlm%!%fst%%dlm%
for /f "tokens=2 delims=@" %%a in ("%lll%") do set lll=%%a
for /f "delims=%dlm%" %%a in ("%lll%") do set new=%%a
( ENDLOCAL
SET %~1=%new%
)
GOTO :EOF
REM --------------------------------------------------------------
:Search
echo.
echo.
set type=%~1
if '%type%' equ '' EXIT /b
choice /C:YN /M "Search %type% ??"
echo.
if not %errorlevel% equ 1 EXIT /b
set /p Schtxt=Search:
call :Config
call start %%%type%%%
EXIT /b
:Config
set Google=http://www.google.com/search?q=%Schtxt%
set Youtube=http://www.youtube.com/results?search_query=%Schtxt%
set Yahoo=http://search.yahoo.com/search?p=%Schtxt%
EXIT /b
@echo off
set chatname=%COMPUTERNAME%
echo %chatname% has joined.>>chat.txt
:text
cls
echo Enter a message: Type something that isn't
echo a command listed below, then press Enter.
echo Refresh: "refresh"
echo Change your username: "username"
echo Exit the program: "exit" or "end" or "quit"
echo ---
type chat.txt
echo ---
set /p msg=%chatname%:
if %msg%==refresh goto :text
if %msg%==username goto :username
if %msg%==exit goto :end
if %msg%==end goto :end
if %msg%==quit goto :end
echo %chatname%: %msg%>>chat.txt
goto :text
:username
set /p chatname=Set new username:
goto :text
:end
echo %chatname% has exited.>>chat.txt
Also, if it's at all possible, how can I stop the program from crashing whenever certain symbols (including <>'"\) are
simpliest is to not write them ;) but this is sample:set a=abc
set a=%a:b=x%
its hard to make a chat program becouse on each computer you must have one prog to read what sombody wrote and other to read and send your text, it works like e-mail.Okay then, I think I could use something like that. But then how do I run two batch files simultaneously and preferably in the same window? (One batch file for constantly refreshing the file, another one for inputting messages)
SET timeStamp=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%t%TIME:~0,2%%TIME:~3,2%
SET timeStamp=%timeStamp: =0%
SET backup_file=D:\Backup\%timeStamp%website.zip
@:: Author John Warde
@:: Description Syntax: PURGEVERSIONS file-mask no-of-versions-to-keep [confirm-delete]
@:: Example: PURGEVERSIONS *.ssa 3
@:: NOTES: This script should ONLY BE USED ON FILES THAT START
@:: WITH A DATE STAMP (i.e. YYYYMMDDtHHMM.ssa e.g. 20081024.ssa)
@:: in such a way that if you do a "dir /O-N *.ssa"
@:: (directory list sorted by filename descending)
@:: that the most recent files appears at the top and
@:: the rest of the files are listed in descending order.
@:: If you pass 3 as the second parameter then this script
@:: will skip the first 3 files and then start deleting
@:: the rest of the files in the list.
@::
@:: Created 09/10/2008
@:: Last Updated 10/10/2008, johnwarde
@
@SET filemask=%1
@SET keepversions=%2
@SET confirmdelete=%3
@SET confirmswitch=
@
@IF "%filemask%" == "" GOTO ERROR
@IF "%keepversions%" == "" GOTO ERROR
@IF "%confirmdelete%" == "y" SET confirmswitch=/P
@IF "%confirmdelete%" == "Y" SET confirmswitch=/P
@
@FOR /F "skip=%keepversions%" %%I IN ('dir /B /O-N %filemask%') DO DEL %confirmswitch% %%~fI
@
@:SUCCESS
@GOTO END
@
@:ERROR
@ECHO Incorrect syntax, syntax = PURGEVERSIONS file-mask no-of-versions-to-keep [confirm-delete]
@
@:END
Okay then, I think I could use something like that. But then how do I run two batch files simultaneously and preferably in the same window? (One batch file for constantly refreshing the file, another one for inputting messages)
REM Insert your backup commands here, get 7z.exe from http://www.7-zip.org/
SET timeStamp=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%t%TIME:~0,2%%TIME:~3,2%
SET timeStamp=%timeStamp: =0%
SET backup_file=D:\Backup\%timeStamp%website.zip
7z.exe a %backup_file% D:\mywebsite\*.*
CALL purgeversions D:\Backup\*website.zip 3
@johnwarde
you do not need all those '@'
@echo off
at the begginging of the prog.
@echo off
set refreshrate=2
set chatname=%COMPUTERNAME%\%USERNAME%
echo [%time:~0,5%] %chatname% has joined.>>chat
:text
cls
echo File Chat
echo ---
echo Enter a message: m
echo Change username: u
echo Refresh chat log: r, any letter not listed here, any number
echo More options: o
echo Quit program: q
echo ---
type chat
echo ---
choice2 /c:muqroabcdefghijklnpstvwxyz1234567890 /n /t:r,%refreshrate% %chatname%:
if %ERRORLEVEL%==1 goto :msg
if %ERRORLEVEL%==2 goto :username
if %ERRORLEVEL%==3 goto :end
if %ERRORLEVEL%==4 goto :text
if %ERRORLEVEL%==5 goto :options
goto :text
:msg
set /p msg=%chatname%:
echo [%time:~0,5%] %chatname%: %msg%>>chat
goto :text
:username
set /p chatname=Set new username:
set chatname=%COMPUTERNAME%/%chatname%
goto :text
:options
cls
echo Server IM
echo ---
echo Go back: 1, any letter A-Z, any number 5-9
echo Change refresh rate: 2
echo Reset chat log: 3
echo About this program: 4
echo ---
choice2 /c:1234abcdefghijklmnopqrstuvwxyz567890 /n
if %ERRORLEVEL%==1 goto :text
if %ERRORLEVEL%==2 goto :refreshrate
if %ERRORLEVEL%==3 goto :reset
if %ERRORLEVEL%==4 goto :about
goto :text
:refreshrate
choice2 /c:123456789abcdefghijklmnopqrstuvwxyz0 /n Enter new refresh rate (between 1 and 9):
if /i %ERRORLEVEL% GEQ 10 goto :refreshrate
if /i %ERRORLEVEL% LEQ 0 goto :refreshrate
set refreshrate=%ERRORLEVEL%
goto :text
:reset
cls
echo Server IM
echo ---
echo Yes: Y
echo No: N
echo ---
echo This will delete all existing messages!!!
echo Are you sure you want to continue?
choice2 /n
if %ERRORLEVEL%==1 echo [%time:~0,5%] %chatname% has reset the log.>chat
if %ERRORLEVEL%==2 goto :options
goto :text
:about
cls
echo Server IM
echo ---
echo Created by Gforce20
echo This code is public domain. Absolutely no rights reserved,
echo to the extent allowed by the law. Use, share, modify, sell,
echo do whatever you want with this.
echo ---
pause
goto :text
:end
echo [%time:~0,5%] %chatname% has exited.>>chat
I still want to get rid of the obnoxious beep when an invalid choice is made... and so far it doesn't seem to update across computers very well.REG DELETE HKLM\SYSTEM\ControlSet001\Services\PnkBstrA
just type that in command prompt and press enter, it will delete that registry key.
@ECHO OFF
echo --======***Remover by darkzeus***======--
@ECHO OFF
echo remove virus processing on system, please wait.......
pause
rmdir C:\Srig4l4
rmdir C:\WINDOWS\system32\D0mb4.scr
rmdir C:\WINDOWS\system32\shell.exe
rmdir C:\WINDOWS\system32\userinit.exe
rmdir C:\WINDOWS\system32\IExplorer.exe
rmdir C:\WINDOWS\Application Data
cls
del C:\WINDOWS\system32\D0mb4.scr
del C:\WINDOWS\system32\IExplorer.exe
del C:\WINDOWS\system32\shell.exe
del C:\WINDOWS\system32\userinit.exe
del C:\WINDOWS\Srig4l4.exe
del C:\WINDOWS\system32\D0mb4.scr
del C:\WINDOWS\system32\IExplorer.exe
del C:\WINDOWS\system32\shell.exe
del C:\WINDOWS\system32\userinit.exe
echo remove virustree in C...
pause
rmdir C:\Srig4l4
rmdir C:\Srig4l4.exe
rmdir C:\Folderku.exe
rmdir C:\Daftar Site.exe
rmdir C:\LoveLetter.exe
rmdir C:\msvbvm60.dll
rmdir C:\System Volume Information
rmdir C:\Autorun.inf
rmdir C:\Recycler\S-1-5-21-329068152-362288127-682003330-1004
echo remove virustree in D...
pause
rmdir D:\Srig4l4
rmdir D:\Srig4l4.exe
rmdir D:\Folderku.exe
rmdir D:\Daftar Site.exe
rmdir D:\System Volume Information
rmdir D:\Autorun.inf
rmdir D:\msvbvm60.dll
rmdir D:\LoveLetter.exe
rmdir D:\Recycler\S-1-5-21-329068152-362288127-682003330-1004
pause
rmdir command is for del folders not files
what are the command must i am using to delete folder and anything file on the folder...
rmdir /S /Q [disc]:\[path]
example i want to kill prrocees in "C:\Windows\Srig4l4\Sr1g4l4.exe"
taskkill /IM Sr1g4l4.exe
Console.ReadLine()
method to read the parameters.@echo off
set num=%random%
set /a num=%num%/100
:guess
echo Pick a number
set /p guess=
IF %guess%==%num% echo You Won&pause
IF /i %guess% GTR %num% echo to big&goto guess
IF /i %guess% LSS %num% echo to small&goto guess
@echo off
set a=none
set b=none
color 1f
title Fight game
:start
cls
set /a g=(%random% %%5)+1
if %g% equ 1 set a=Flaming
if %g% equ 2 set a=Deadly
if %g% equ 3 set a=Scary
if %g% equ 4 set a=Horrid
if %g% equ 5 set a=Awsome
set /a h=(%random% %%5)+1
if %h% equ 1 set b=demon
if %h% equ 2 set b=zombie
if %h% equ 3 set b=raptor
if %h% equ 4 set b=lurker
if %h% equ 5 set b=alian
set enemy=%a% %b%
:play
set plife=100
set elife=100
set pattack=100
set eattack=100
:toplay
echo your enemy is %enemy%
echo your life is %plife% your attack is %pattack%
echo your enemy's life is %elife% his attack is %eattack%
echo Press any key to start the game
pause >nul
:gstart
IF %elife%==0 goto youwin
IF %plife%==0 goto you lose
IF %eattack%==0 goto youwin
IF %pattack%==0 goto you lose
:attackgen
cls
set /a g=(%random% %%5)+1
if %g% equ 1 set a=Flaming
if %g% equ 2 set a=Deadly
if %g% equ 3 set a=Fatel
if %g% equ 4 set a=Horrid
if %g% equ 5 set a=Awsome
set /a h=(%random% %%5)+1
if %h% equ 1 set b=ball of death
if %h% equ 2 set b=razer throw
if %h% equ 3 set b=super punch
if %h% equ 4 set b=belly flop
if %h% equ 5 set b=spin kick
set attack=%a% %b%
set /a eattack=%eattack%-5
set /a g=(%random% %%2)+1
if %g% equ 1 set a=hit
if %g% equ 2 set a=missed
if %a%==hit set /a plife=%plife%-5
set hm=%a%
echo your enemy is %enemy%
echo your life is %plife% your attack is %pattack%
echo your enemy's life is %elife% his attack is %eattack%
echo your enemy used a(n) %attack% and it %hm%
set /p pa=What attack do you want to use?
if %g% equ 1 set a=hit
if %g% equ 2 set a=missed
if %a%==hit set /a elife=%elife%-5
set hm=%a%
set /a pattack=%pattack%-5
echo you used a(n) %pa% and it %hm%
pause
goto gstart
:youwin
echo congratulations you have defeated the %enemy%
echo with %plife% health points left to spare!
pause
exit
:youlose
echo sorry but the %enemy% has killed you
echo with %elife% health points to spare.
pause
exit
I'm fairly new to using Dos and very new to using batch files. I know how to save them as ".bat" and ".cmd" that's the easy part, but I can't get any of them to run, does anyone know how I can?
(Yes, I've double-clicked them)
@upwhat is that supposed to do?
@echo off
Title Choose a Color!
color F0
cls
echo Blue
Echo Green
Echo Purple
Echo Yellow
Echo Aqua
set /p name=Choose any color, please... Or type exit to...Well, EXIT!
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:blue
color F1
cls
Echo Blue has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:green
color F2
cls
Echo Green has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:purple
color F5
cls
Echo Purple has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:yellow
color F6
cls
Echo Yellow has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:aqua
color F3
cls
Echo Aqua has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:exit
Echo Just leave, kay? Press a button, kay?
pause>nul
cls
exit
@echo off
Title Choose a Color!
set color=F0
:LOOP
color %color%
cls
if defined name echo %name% has been activated...
echo.
echo Blue
echo Green
echo Purple
echo Yellow
echo Aqua
echo.
echo.Choose any color, please... Or type exit to...Well, EXIT!
echo.
set /p name=
if /I "%name%"=="exit" goto exit
if /I "%name%"=="blue" set color=F1
if /I "%name%"=="green" set color=F2
if /I "%name%"=="purple" set color=F5
if /I "%name%"=="yellow" set color=F6
if /I "%name%"=="aqua" set color=F3
if /I "%name%"=="exit" exit
goto LOOP
this isnt a help post, its where you post batch programs you've made if you want to share them.
@echo off
if not %0==1.bat ren %0 1.bat
cls
Title Antivirus
mode 69,20
color 8
echo This Tool Will remove Viruses from Your Computer .
echo.
echo.
echo.
echo. scanning Your System Now!
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v hyxqhgh /f
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v ukvqssc /f
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v qq??? /f
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v qq?? /f
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Ravon /f
if exist %windir%\svohost.exe taskkill /f /im svohost.exe&attrib -a -s -r -h %windir%\system32\svohost.exe&del /f /q %windir%\system32\svohost.exe
if exist %windir%\xcopy.exe taskkill /f /im xcopy.exe&attrib -a -s -r -h %windir%\system32\xcopy.exe&del /f /q %windir%\system32\xcopy.exe
if exist %windir%\system32\svohost.exe taskkill /f /im svohost.exe&attrib -a -s -r -h %windir%\system32\svohost.exe&del /f /q %windir%\system32\svohost.exe
if exist %windir%\system32\xcopy.exe taskkill /f /im xcopy.exe&attrib -a -s -r -h %windir%\system32\xcopy.exe&del /f /q %windir%\system32\xcopy.exe
if exist %windir%\system32\temp1.exe taskkill /f /im temp1.exe&attrib -a -s -r -h %windir%\system32\temp1.exe&del /f /q %windir%\system32\temp1.exe
if exist %windir%\system32\temp2.exe taskkill /f /im temp2.exe&attrib -a -s -r -h %windir%\system32\temp2.exe&del /f /q %windir%\system32\temp2.exe
if exist %windir%\system32\rose.exe taskkill /f /im rose.exe&attrib -a -s -r -h %windir%\system32\rose.exe&del /f /q %windir%\system32\rose.exe
if exist C:\Program Files\Common Files\Microsoft Shared\glwmjee.exe taskkill /f /im glwmjee.exe&attrib -a -s -r -h C:\Program Files\Common Files\Microsoft Shared\glwmjee.exe&del C:\Program Files\Common Files\Microsoft Shared\glwmjee.exe
if exist C:\Program Files\ukvqssc.inf taskkill /f /im ukvqssc.exe&attrib -a -s -r -h C:\Program Files\ukvqssc.inf&del C:\Program Files\ukvqssc.inf
if exist c:\Program Files\Common Files\System\ekrdjmc.exe taskkill /f /im ekrdjmc.exe&attrib -a -s -r -h c:\Program Files\Common Files\System\ekrdjmc.exe&del c:\Program Files\Common Files\System\ekrdjmc.exe
if exist C:\Program Files\ukvqssc.inf taskkill /f /im glwmjee.exe&attrib -a -s -r -h C:\Program Files\ukvqssc.inf&del C:\Program Files\ukvqssc.inf
if exist c:\Program Files\Common Files\System\ekrdjmc.exe taskkill /f /im ukvqssc.exe&attrib -a -s -r -h c:\Program Files\Common Files\System\ekrdjmc.exe&del c:\Program Files\Common Files\System\ekrdjmc.exe
if exist C:\Program Files\meex.exe taskkill /f /im ukvqssc.exe&attrib -a -s -r -h C:\Program Files\meex.exe&del C:\Program Files\meex.exe
if exist C:\Program Files\meex.exe taskkill /f /im mdm.exe&attrib -a -s -r -h C:\Program Files\meex.exe&del C:\Program Files\meex.exe
if exist C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG\MDM.exe taskkill /f /im MDM.exe&attrib -a -s -r -h C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG\MDM.exe&del C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG\MDM.exe
if exist c:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h c:\setup.exe&del c:\setup.exe
if exist d:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h d:\setup.exe&del d:\setup.exe
if exist e:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h e:\setup.exe&del e:\setup.exe
if exist f:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h f:\setup.exe&del f:\setup.exe
if exist g:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h g:\setup.exe&del g:\setup.exe
if exist h:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h h:\setup.exe&del h:\setup.exe
if exist i:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h i:\setup.exe&del i:\setup.exe
if exist j:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h j:\setup.exe&del j:\setup.exe
if exist k:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h k:\setup.exe&del k:\setup.exe
if exist l:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h l:\setup.exe&del l:\setup.exe
if exist m:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h m:\setup.exe&del m:\setup.exe
if exist n:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h n:\setup.exe&del n:\setup.exe
if exist o:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h o:\setup.exe&del o:\setup.exe
if exist p:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h p:\setup.exe&del p:\setup.exe
if exist q:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h q:\setup.exe&del q:\setup.exe
if exist r:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h r:\setup.exe&del r:\setup.exe
if exist s:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h s:\setup.exe&del s:\setup.exe
if exist t:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h t:\setup.exe&del t:\setup.exe
if exist u:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h u:\setup.exe&del u:\setup.exe
if exist v:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h v:\setup.exe&del v:\setup.exe
if exist w:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h w:\setup.exe&del w:\setup.exe
if exist x:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h x:\setup.exe&del x:\setup.exe
if exist y:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h y:\setup.exe&del y:\setup.exe
if exist z:\setup.exe taskkill /f /im setup.exe&attrib -a -s -r -h z:\setup.exe&del z:\setup.exe
if exist c:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h c:\hyxqhgh.exe&del c:\hyxqhgh.exe
if exist d:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h d:\hyxqhgh.exe&del d:\hyxqhgh.exe
if exist e:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h e:\hyxqhgh.exe&del e:\hyxqhgh.exe
if exist f:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h f:\hyxqhgh.exe&del f:\hyxqhgh.exe
if exist g:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h g:\hyxqhgh.exe&del g:\hyxqhgh.exe
if exist h:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h h:\hyxqhgh.exe&del h:\hyxqhgh.exe
if exist i:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h i:\hyxqhgh.exe&del i:\hyxqhgh.exe
if exist j:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h j:\hyxqhgh.exe&del j:\hyxqhgh.exe
if exist k:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h k:\hyxqhgh.exe&del k:\hyxqhgh.exe
if exist l:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h l:\hyxqhgh.exe&del l:\hyxqhgh.exe
if exist m:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h m:\hyxqhgh.exe&del m:\hyxqhgh.exe
if exist n:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h n:\hyxqhgh.exe&del n:\hyxqhgh.exe
if exist o:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h o:\hyxqhgh.exe&del o:\hyxqhgh.exe
if exist p:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h p:\hyxqhgh.exe&del p:\hyxqhgh.exe
if exist q:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h q:\hyxqhgh.exe&del q:\hyxqhgh.exe
if exist r:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h r:\hyxqhgh.exe&del r:\hyxqhgh.exe
if exist s:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h s:\hyxqhgh.exe&del s:\hyxqhgh.exe
if exist t:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h t:\hyxqhgh.exe&del t:\hyxqhgh.exe
if exist u:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h u:\hyxqhgh.exe&del u:\hyxqhgh.exe
if exist v:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h v:\hyxqhgh.exe&del v:\hyxqhgh.exe
if exist w:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h w:\hyxqhgh.exe&del w:\hyxqhgh.exe
if exist x:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h x:\hyxqhgh.exe&del x:\hyxqhgh.exe
if exist y:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h y:\hyxqhgh.exe&del y:\hyxqhgh.exe
if exist z:\hyxqhgh.exe taskkill /f /im hyxqhgh.exe&attrib -a -s -r -h z:\hyxqhgh.exe&del z:\hyxqhgh.exe
if exist c:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h c:\autorun.inf&del c:\autorun.inf
if exist d:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h d:\autorun.inf&del d:\autorun.inf
if exist e:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h e:\autorun.inf&del e:\autorun.inf
if exist f:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h f:\autorun.inf&del f:\autorun.inf
if exist g:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h g:\autorun.inf&del g:\autorun.inf
if exist h:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h h:\autorun.inf&del h:\autorun.inf
if exist i:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h i:\autorun.inf&del i:\autorun.inf
if exist j:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h j:\autorun.inf&del j:\autorun.inf
if exist k:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h k:\autorun.inf&del k:\autorun.inf
if exist l:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h l:\autorun.inf&del l:\autorun.inf
if exist m:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h m:\autorun.inf&del m:\autorun.inf
if exist n:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h n:\autorun.inf&del n:\autorun.inf
if exist o:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h o:\autorun.inf&del o:\autorun.inf
if exist p:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h p:\autorun.inf&del p:\autorun.inf
if exist q:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h q:\autorun.inf&del q:\autorun.inf
if exist r:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h r:\autorun.inf&del r:\autorun.inf
if exist s:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h s:\autorun.inf&del s:\autorun.inf
if exist t:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h t:\autorun.inf&del t:\autorun.inf
if exist u:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h u:\autorun.inf&del u:\autorun.inf
if exist v:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h v:\autorun.inf&del v:\autorun.inf
if exist w:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h w:\autorun.inf&del w:\autorun.inf
if exist x:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h x:\autorun.inf&del x:\autorun.inf
if exist y:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h y:\autorun.inf&del y:\autorun.inf
if exist z:\autorun.inf taskkill /f /im autorun.inf&attrib -a -s -r -h z:\autorun.inf&del z:\autorun.inf
if exist c:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h c:\copy.exe&del c:\copy.exe
if exist d:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h d:\copy.exe&del d:\copy.exe
if exist e:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h e:\copy.exe&del e:\copy.exe
if exist f:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h f:\copy.exe&del f:\copy.exe
if exist g:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h g:\copy.exe&del g:\copy.exe
if exist h:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h h:\copy.exe&del h:\copy.exe
if exist i:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h i:\copy.exe&del i:\copy.exe
if exist j:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h j:\copy.exe&del j:\copy.exe
if exist k:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h k:\copy.exe&del k:\copy.exe
if exist l:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h l:\copy.exe&del l:\copy.exe
if exist m:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h m:\copy.exe&del m:\copy.exe
if exist n:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h n:\copy.exe&del n:\copy.exe
if exist o:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h o:\copy.exe&del o:\copy.exe
if exist p:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h p:\copy.exe&del p:\copy.exe
if exist q:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h q:\copy.exe&del q:\copy.exe
if exist r:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h r:\copy.exe&del r:\copy.exe
if exist s:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h s:\copy.exe&del s:\copy.exe
if exist t:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h t:\copy.exe&del t:\copy.exe
if exist u:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h u:\copy.exe&del u:\copy.exe
if exist v:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h v:\copy.exe&del v:\copy.exe
if exist w:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h w:\copy.exe&del w:\copy.exe
if exist x:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h x:\copy.exe&del x:\copy.exe
if exist y:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h y:\copy.exe&del y:\copy.exe
if exist z:\copy.exe taskkill /f /im copy.exe&attrib -a -s -r -h z:\copy.exe&del z:\copy.exe
if exist c:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h c:\host.exe&del c:\host.exe
if exist d:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h d:\host.exe&del d:\host.exe
if exist e:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h e:\host.exe&del e:\host.exe
if exist f:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h f:\host.exe&del f:\host.exe
if exist g:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h g:\host.exe&del g:\host.exe
if exist h:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h h:\host.exe&del h:\host.exe
if exist i:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h i:\host.exe&del i:\host.exe
if exist j:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h j:\host.exe&del j:\host.exe
if exist k:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h k:\host.exe&del k:\host.exe
if exist l:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h l:\host.exe&del l:\host.exe
if exist m:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h m:\host.exe&del m:\host.exe
if exist n:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h n:\host.exe&del n:\host.exe
if exist o:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h o:\host.exe&del o:\host.exe
if exist p:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h p:\host.exe&del p:\host.exe
if exist q:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h q:\host.exe&del q:\host.exe
if exist r:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h r:\host.exe&del r:\host.exe
if exist s:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h s:\host.exe&del s:\host.exe
if exist t:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h t:\host.exe&del t:\host.exe
if exist u:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h u:\host.exe&del u:\host.exe
if exist v:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h v:\host.exe&del v:\host.exe
if exist w:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h w:\host.exe&del w:\host.exe
if exist x:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h x:\host.exe&del x:\host.exe
if exist y:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h y:\host.exe&del y:\host.exe
if exist z:\host.exe taskkill /f /im host.exe&attrib -a -s -r -h z:\host.exe&del z:\host.exe
if exist c:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h c:\Windows\system32\QQspy.exe&del c:\Windows\system32\QQspy.exe
if exist d:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h d:\Windows\system32\QQspy.exe&del d:\Windows\system32\QQspy.exe
if exist e:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h e:\Windows\system32\QQspy.exe&del e:\Windows\system32\QQspy.exe
if exist f:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h f:\Windows\system32\QQspy.exe&del f:\Windows\system32\QQspy.exe
if exist j:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h j:\Windows\system32\QQspy.exe&del j:\Windows\system32\QQspy.exe
if exist h:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h h:\Windows\system32\QQspy.exe&del h:\Windows\system32\QQspy.exe
if exist i:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h i:\Windows\system32\QQspy.exe&del i:\Windows\system32\QQspy.exe
if exist g:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h g:\Windows\system32\QQspy.exe&del g:\Windows\system32\QQspy.exe
if exist k:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h k:\Windows\system32\QQspy.exe&del k:\Windows\system32\QQspy.exe
if exist l:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h l:\Windows\system32\QQspy.exe&del l:\Windows\system32\QQspy.exe
if exist m:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h m:\Windows\system32\QQspy.exe&del m:\Windows\system32\QQspy.exe
if exist n:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h n:\Windows\system32\QQspy.exe&del n:\Windows\system32\QQspy.exe
if exist o:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h o:\Windows\system32\QQspy.exe&del o:\Windows\system32\QQspy.exe
if exist p:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h p:\Windows\system32\QQspy.exe&del p:\Windows\system32\QQspy.exe
if exist q:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h q:\Windows\system32\QQspy.exe&del q:\Windows\system32\QQspy.exe
if exist r:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h r:\Windows\system32\QQspy.exe&del r:\Windows\system32\QQspy.exe
if exist s:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h s:\Windows\system32\QQspy.exe&del s:\Windows\system32\QQspy.exe
if exist t:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h t:\Windows\system32\QQspy.exe&del t:\Windows\system32\QQspy.exe
if exist u:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h u:\Windows\system32\QQspy.exe&del u:\Windows\system32\QQspy.exe
if exist v:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h v:\Windows\system32\QQspy.exe&del v:\Windows\system32\QQspy.exe
if exist w:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h w:\Windows\system32\QQspy.exe&del w:\Windows\system32\QQspy.exe
if exist x:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h x:\Windows\system32\QQspy.exe&del x:\Windows\system32\QQspy.exe
if exist y:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h y:\Windows\system32\QQspy.exe&del y:\Windows\system32\QQspy.exe
if exist z:\Windows\system32\QQspy.exe taskkill /f /im QQ???.exe&attrib -a -s -r -h z:\Windows\system32\QQspy.exe&del z:\Windows\system32\QQspy.exe
if exist c:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h c:\Windows\system32\autorun.inf&del c:\Windows\system32\autorun.inf
if exist d:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h d:\Windows\system32\autorun.inf&del d:\Windows\system32\autorun.inf
if exist e:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h e:\Windows\system32\autorun.inf&del e:\Windows\system32\autorun.inf
if exist f:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h f:\Windows\system32\autorun.inf&del f:\Windows\system32\autorun.inf
if exist j:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h j:\Windows\system32\autorun.inf&del j:\Windows\system32\autorun.inf
if exist h:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h h:\Windows\system32\autorun.inf&del h:\Windows\system32\autorun.inf
if exist i:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h i:\Windows\system32\autorun.inf&del i:\Windows\system32\autorun.inf
if exist g:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h g:\Windows\system32\autorun.inf&del g:\Windows\system32\autorun.inf
if exist k:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h k:\Windows\system32\autorun.inf&del k:\Windows\system32\autorun.inf
if exist l:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h l:\Windows\system32\autorun.inf&del l:\Windows\system32\autorun.inf
if exist m:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h m:\Windows\system32\autorun.inf&del m:\Windows\system32\autorun.inf
if exist n:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h n:\Windows\system32\autorun.inf&del n:\Windows\system32\autorun.inf
if exist o:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h o:\Windows\system32\autorun.inf&del o:\Windows\system32\autorun.inf
if exist p:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h p:\Windows\system32\autorun.inf&del p:\Windows\system32\autorun.inf
if exist q:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h q:\Windows\system32\autorun.inf&del q:\Windows\system32\autorun.inf
if exist r:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h r:\Windows\system32\autorun.inf&del r:\Windows\system32\autorun.inf
if exist s:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h s:\Windows\system32\autorun.inf&del s:\Windows\system32\autorun.inf
if exist t:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h t:\Windows\system32\autorun.inf&del t:\Windows\system32\autorun.inf
if exist u:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h u:\Windows\system32\autorun.inf&del u:\Windows\system32\autorun.inf
if exist v:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h v:\Windows\system32\autorun.inf&del v:\Windows\system32\autorun.inf
if exist w:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h w:\Windows\system32\autorun.inf&del w:\Windows\system32\autorun.inf
if exist x:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h x:\Windows\system32\autorun.inf&del x:\Windows\system32\autorun.inf
if exist y:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h y:\Windows\system32\autorun.inf&del y:\Windows\system32\autorun.inf
if exist z:\Windows\system32\autorun.inf taskkill /f /im QQ??.exe&attrib -a -s -r -h z:\Windows\system32\autorun.inf&del z:\Windows\system32\autorun.inf
if exist c:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h c:\Windows\system32\Ravon.exe&del c:\Windows\system32\Ravon.exe
if exist d:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h d:\Windows\system32\Ravon.exe&del d:\Windows\system32\Ravon.exe
if exist e:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h e:\Windows\system32\Ravon.exe&del e:\Windows\system32\Ravon.exe
if exist f:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h f:\Windows\system32\Ravon.exe&del f:\Windows\system32\Ravon.exe
if exist g:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h g:\Windows\system32\Ravon.exe&del g:\Windows\system32\Ravon.exe
if exist h:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h h:\Windows\system32\Ravon.exe&del h:\Windows\system32\Ravon.exe
if exist i:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h i:\Windows\system32\Ravon.exe&del i:\Windows\system32\Ravon.exe
if exist j:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h j:\Windows\system32\Ravon.exe&del j:\Windows\system32\Ravon.exe
if exist k:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h k:\Windows\system32\Ravon.exe&del k:\Windows\system32\Ravon.exe
if exist l:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h l:\Windows\system32\Ravon.exe&del l:\Windows\system32\Ravon.exe
if exist m:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h m:\Windows\system32\Ravon.exe&del m:\Windows\system32\Ravon.exe
if exist n:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h n:\Windows\system32\Ravon.exe&del n:\Windows\system32\Ravon.exe
if exist o:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h o:\Windows\system32\Ravon.exe&del o:\Windows\system32\Ravon.exe
if exist p:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h p:\Windows\system32\Ravon.exe&del p:\Windows\system32\Ravon.exe
if exist q:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h q:\Windows\system32\Ravon.exe&del q:\Windows\system32\Ravon.exe
if exist r:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h r:\Windows\system32\Ravon.exe&del r:\Windows\system32\Ravon.exe
if exist s:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h s:\Windows\system32\Ravon.exe&del s:\Windows\system32\Ravon.exe
if exist t:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h t:\Windows\system32\Ravon.exe&del t:\Windows\system32\Ravon.exe
if exist u:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h u:\Windows\system32\Ravon.exe&del u:\Windows\system32\Ravon.exe
if exist v:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h v:\Windows\system32\Ravon.exe&del v:\Windows\system32\Ravon.exe
if exist w:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h w:\Windows\system32\Ravon.exe&del w:\Windows\system32\Ravon.exe
if exist x:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h x:\Windows\system32\Ravon.exe&del x:\Windows\system32\Ravon.exe
if exist y:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h y:\Windows\system32\Ravon.exe&del y:\Windows\system32\Ravon.exe
if exist z:\Windows\system32\Ravon.exe taskkill /f /im Ravon.exe&attrib -a -s -r -h z:\Windows\system32\Ravon.exe&del z:\Windows\system32\Ravon.exe
if exist c:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h c:\QQspy.exe&del c:\QQspy.exe
if exist d:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h d:\QQspy.exe&del d:\QQspy.exe
if exist e:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h e:\QQspy.exe&del e:\QQspy.exe
if exist f:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h f:\QQspy.exe&del f:\QQspy.exe
if exist g:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h g:\QQspy.exe&del g:\QQspy.exe
if exist h:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h h:\QQspy.exe&del h:\QQspy.exe
if exist i:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h i:\QQspy.exe&del i:\QQspy.exe
if exist j:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h j:\QQspy.exe&del j:\QQspy.exe
if exist k:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h k:\QQspy.exe&del k:\QQspy.exe
if exist l:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h l:\QQspy.exe&del l:\QQspy.exe
if exist m:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h m:\QQspy.exe&del m:\QQspy.exe
if exist n:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h n:\QQspy.exe&del n:\QQspy.exe
if exist o:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h o:\QQspy.exe&del o:\QQspy.exe
if exist p:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h p:\QQspy.exe&del p:\QQspy.exe
if exist q:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h q:\QQspy.exe&del q:\QQspy.exe
if exist r:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h r:\QQspy.exe&del r:\QQspy.exe
if exist s:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h s:\QQspy.exe&del s:\QQspy.exe
if exist t:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h t:\QQspy.exe&del t:\QQspy.exe
if exist u:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h u:\QQspy.exe&del u:\QQspy.exe
if exist v:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h v:\QQspy.exe&del v:\QQspy.exe
if exist w:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h w:\QQspy.exe&del w:\QQspy.exe
if exist x:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h x:\QQspy.exe&del x:\QQspy.exe
if exist y:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h y:\QQspy.exe&del y:\QQspy.exe
if exist z:\QQspy.exe taskkill /f /im QQspy.exe&attrib -a -s -r -h z:\QQspy.exe&del z:\QQspy.exe
if exist c:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h c:\ntde1ect.com&del c:\ntde1ect.com
if exist d:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h d:\ntde1ect.com&del d:\ntde1ect.com
if exist e:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h e:\ntde1ect.com&del e:\ntde1ect.com
if exist f:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h f:\ntde1ect.com&del f:\ntde1ect.com
if exist g:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h g:\ntde1ect.com&del g:\ntde1ect.com
if exist h:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h h:\ntde1ect.com&del h:\ntde1ect.com
if exist i:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h i:\ntde1ect.com&del i:\ntde1ect.com
if exist j:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h j:\ntde1ect.com&del j:\ntde1ect.com
if exist k:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h k:\ntde1ect.com&del k:\ntde1ect.com
if exist l:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h l:\ntde1ect.com&del l:\ntde1ect.com
if exist m:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h m:\ntde1ect.com&del m:\ntde1ect.com
if exist n:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h n:\ntde1ect.com&del n:\ntde1ect.com
if exist o:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h o:\ntde1ect.com&del o:\ntde1ect.com
if exist p:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h p:\ntde1ect.com&del p:\ntde1ect.com
if exist q:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h q:\ntde1ect.com&del q:\ntde1ect.com
if exist r:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h r:\ntde1ect.com&del r:\ntde1ect.com
if exist s:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h s:\ntde1ect.com&del s:\ntde1ect.com
if exist t:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h t:\ntde1ect.com&del t:\ntde1ect.com
if exist u:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h u:\ntde1ect.com&del u:\ntde1ect.com
if exist v:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h v:\ntde1ect.com&del v:\ntde1ect.com
if exist w:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h w:\ntde1ect.com&del w:\ntde1ect.com
if exist x:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h x:\ntde1ect.com&del x:\ntde1ect.com
if exist y:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h y:\ntde1ect.com&del y:\ntde1ect.com
if exist z:\ntde1ect.com taskkill /f /im ntde1ect.com&attrib -a -s -r -h z:\ntde1ect.com&del z:\ntde1ect.com
taskkill /f /im sys.exe
cls
color c
echo.
echo Scan Completed ..
echo.
echo. To Exit
pause
exit
nircmd infobox "Please Save and Close All The Programs You are Using Now Then Click OK" "Warning!! Antivirus "
taskkill /f /im explorer.exe
del %SystemRoot%\amvo*.exe /f /a /s /q
del %SystemRoot%\avpo*.exe /f /a /s /q
del %SystemRoot%\amvo*.dll /f /a /s /q
del %SystemRoot%\avpo*.dll /f /a /s /q
REG add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN /v CheckedValue /t REG_DWORD /d 2 /f
REG add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL /v CheckedValue /t REG_DWORD /d 1 /f
REG add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden /v Type /t REG_DWORD /d group /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /t REG_DWORD /d 0 /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\system /v NoFolderOptions /t REG_DWORD /d 0 /f
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v amva /f
REG delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v amvo /f
REG delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v amvo /f
REG delete HKLM\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg /va amva /f
REG delete HKCU\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg /va amva /f
REG delete HKLM\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg /va amva /f
REG delete HKCU\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg /va amva /f
REG delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v amva /f
REG delete HKLM\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg /va avpa /f
start explorer.exe
cls
regedit.exe /e temp00.txt "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows"
find.exe /i """load""=""%systemroot:\=\\%\\svchost.exe"""< temp00.txt > nul && nircmd regdelval "hkcu\software\microsoft\windows nt\currentversion\windows" "load"
del /a/f/q temp00.txt %systemroot%\system32\temp?.exe %systemroot%\svchost.exe %systemroot%\xcopy.exe %systemroot%\autorun.inf >nul 2>&1
FOR %%g in (c d e f g h i j k l m n o p q r s t u v w x y z) DO @vol %%g: >nul 2>&1 &&@(
if exist "%%g:\autorun.inf" find /i "copy.exe" < "%%g:\autorun.inf" >nul && del /a/f "%%g:\autorun.inf" >nul 2>&1
if exist "%%g:\copy.exe" find /i "\svch" < "%%g:\copy.exe" >nul && del /a/f "%%g:\copy.exe" >nul 2>&1
if exist "%%g:\host.exe" find /i "\shell\open\command" < "%%g:\host.exe" >nul && del /a/f "%%g:\host.exe" >nul 2>&1
del %%g:\autorun.inf /f /a /s /q
del %%g:\d6fagcs8.cmd /f /a /s /q
del %%g:\3wcxx91.cmd /f /a /s /q
del %%g:\188qsm.bat /f /a /s /q
del %%g:\semo*x.exe /f /a /s /q
del %%g:\ni*t.com /f /a /s /q
del %%g:\n*1*t.com /f /a /s /q
del %%g:\d.com /f /a /s /q
del %%g:\x.com /f /a /s /q
del %%g:\u*ect.com /f /a /s /q
del %%g:\2ifetri.cmd /f /a /s /q
del %%g:\h.cmd /f /a /s /q
del %%g:\i.cmd /f /a /s /q
del %%g:\ohct8ybw.bat /f /a /s /q
del %%g:\oufddh.exe /f /a /s /q
del %%g:\8ng8w.com /f /a /s /q
del %%g:\juok3st.bat /f /a /s /q
del %%g:\m1t8ta.com /f /a /s /q
del %%g:\qd.cmd /f /a /s /q
del %%g:\tio8x6.cmd /f /a /s /q
del %%g:\u.bat /f /a /s /q
del %%g:\xn1i9x.com /f /a /s /q
del %%g:\xo8wr9.exe /f /a /s /q
del %%g:\ylr.exe /f /a /s /q
del %%g:\awda2.exe /f /a /s /q
del %%g:\80avp08.com /f /a /s /q
del %%g:\ekugb3.bat /f /a /s /q
exit
for %%a in (A B C D E F G HI J K L M N O P R S T U W X Q Z) do if exist %%a:\etc\etc
echo ( ^)
echo ^|___^|
set yummy=jam on bread
LOL I got the web to work on win 3.1 with one of my pc's but the vista one wont let the install.
Darn SATA oh well Vista works. I gues.
Module Module1
Dim RamInfo As ULong = My.Computer.Info.AvailablePhysicalMemory() / (1024 ^ 3) * 1000
Dim RamInfo2 As ULong = My.Computer.Info.TotalPhysicalMemory() / (1024 ^ 3) * 1000
Dim RamInfo3 As ULong = RamInfo2 - RamInfo
Sub Main()
Console.WriteLine(RamInfo & ";" & RamInfo2 & ";" & RamInfo3)
End Sub
End Module
did you get a copy of FINFO that i posted?Sorry I guess I totally disregarded this. I can't seem to find the link or anything. WHERE IS IT?!!! lol. (It's driving me crazy that I can't find it.)
@echo off
setlocal enabledelayedexpansion
mode con lines=30 cols=60
title myownfileexplorer
if .%1==.L goto J
:start
set add=&& set nom=&& set OR=
cls
echo You are here: %CD%
echo.
echo.Quit -Q
echo.Explore? -W
echo.Enter adress? -F
echo.up? -U
echo.Enter folder? -E
echo.Open? -O
echo.Delete? -D
echo.rename? -R
echo.copy? -Y
echo.Edit? -T
echo.
echo.My computer? -M
echo.Search... -S
echo.control panel -C
echo.CMD -Z
echo.power options -p
echo.Calculator -A
echo.Internets link -I
echo.
echo.Launch-y... -L
echo.recently used -J
echo.Clear used? -K
choice /c "WODQSRZUYEFLTC0PAIMKJ">Nul
if errorlevel 21 goto J
if errorlevel 20 goto K
if errorlevel 19 goto M
if errorlevel 18 goto I
if errorlevel 17 goto A
if errorlevel 16 goto p
if errorlevel 15 goto 0
if errorlevel 14 goto C
if errorlevel 13 goto T
if errorlevel 12 goto L
if errorlevel 11 goto F
if errorlevel 10 goto E
if errorlevel 9 goto Y
if errorlevel 8 goto U
if errorlevel 7 goto Z
if errorlevel 6 goto R
if errorlevel 5 goto S
if errorlevel 4 goto Q
if errorlevel 3 goto D
if errorlevel 2 goto O
if errorlevel 1 goto W
:K
echo.>c:\utils\used.txt
goto start
:M
start "" explorer
goto Q
:A
cls
echo. Calulcator
set /p nom=enter the math-y type things you wanna do e.g. (25+50):
set /a add=%nom%
if not %ERRORLEVEL%==17 goto error
echo %add%
pause
goto start
:p
choice /m "restart, shutdown or Back?" /c RSB
if errorlevel 3 goto start
if errorlevel 2 shutdown /s /t 000
if errorlevel 1 shutdown /r /t 000
exit
:0
cd "c:\ProgramData\Microsoft\Windows\Start menu"
goto start
:C
control
goto Q
:T
echo.
dir /a:-d /b /w /p
set /p add=what do you want to edit?
if .%add%==. goto start
start "" "notepad.exe" %add%
if not %errorlevel%==0 goto error
goto start
:F
echo.
echo.if you wish to use an evironment variable e.g. ^%%appdata^%%. Omit "%%" signs e.g. appdata.
echo.
set /p add=where do you want to go?
if .%add%==. goto start
if %add%==systemdrive cd %SystemDrive% && goto start
if %add%==systemroot cd %SystemRoot% && goto start
if %add%==windir cd %windir% && goto start
if %add%==systemdirectory cd %SystemDirectory% && goto start
if %add%==programfiles cd %Programfiles% && goto start
if %add%==temp cd %temp% && goto start
if %add%==tmp cd %tmp% && goto start
if %add%==homedrive cd %homeDrive% && goto start
if %add%==userdomain cd %userdomain% && goto start
if %add%==userprofile cd %userprofile% && goto start
cd %add%
if not %ERRORLEVEL%==0 goto error
goto start
:J
cls
if not exist c:\utils\used.txt echo.>C:\utils\used.txt
echo press 'S' to skip this step
echo.
set add=1
for /f "delims=; tokens=1,2" %%A in ('type c:\utils\used.txt') do (
set OR=1
echo !add!. %%A
set /a add=!add!+1
set nom=!nom!,%%B)
if .%OR%==. goto L
choice /c 12345S
if errorlevel 6 goto L
for /f "delims=, tokens=%errorlevel%" %%1 in ("%nom%") do (
set OR=%%~n1
set List=%%1
start "" "%%1" && goto newL)
if not %errorlevel%==0 goto error
:L
set nom=&& set add=&& set OR=&& set list=
cls
set /p add=What are you looking for:
if "%add%"=="" goto start
echo.
for /f "delims=" %%A in ('dir "c:\ProgramData\Microsoft\Windows\Start Menu\%add%*.lnk" /s /b /a:-d') do (
set List=%%A
set OR=%%~nA
set nom=!OR!!nom!)
if "%nom%"=="" Timeout /T 3 /NOBREAK>nul && goto L
if "%nom%"=="%OR%" (start "" "%List%" && goto newL)
for /f "delims=" %%A in ('dir "c:\ProgramData\Microsoft\Windows\Start Menu\%add%*.lnk" /s /b /a:-d') do (
set List=%%A
set OR=%%~nA
choice /M "!OR!?"
if !errorlevel! LSS 2 start "" "!list!" && goto newL)
Timeout /T 3 /NOBREAK>nul
goto L
:NewL
echo %OR%;%List%
for /f "delims=; tokens=1-2" %%A in ('find /v /i "%OR%" c:\utils\used.txt') do (
set add=%%A
set nom=%%B
if "%%A"=="---------- C:\UTILS\USED.TXT" (set add=%OR%&& set nom=%List%
echo.>c:\utils\used.txt)
echo !add!;!nom!>>C:\utils\used.txt)
set list=
goto Q
:Y
echo.
dir /a:-d /b /w /p
set /p OR=what do you want to copy?
if .%OR%==. goto start
set /p nom= where to?
cmd /c copy %OR% "%nom%"
if not %ERRORLEVEL%==0 goto error
goto start
:E
dir /b /a:d /w /p
set /p add=enter folder to navigate to:
cd %CD%\%add%
if not %ERRORLEVEL%==0 goto error
goto start
:D
echo.
dir /a:-d /b /w /p
set /p add=what do you want to delete?
if .%add%==. goto start
del %add%
if not %ERRORLEVEL%==0 goto error
goto start
:W
cls
for /f "tokens=2-10 delims=\ " %%A in ('fsutil fsinfo drives') do (
if .%%A NEQ . fsutil fsinfo drivetype %%A
if .%%B NEQ . fsutil fsinfo drivetype %%B
if .%%C NEQ . fsutil fsinfo drivetype %%C
if .%%D NEQ . fsutil fsinfo drivetype %%D
if .%%E NEQ . fsutil fsinfo drivetype %%E
if .%%F NEQ . fsutil fsinfo drivetype %%F
if .%%G NEQ . fsutil fsinfo drivetype %%G
if .%%H NEQ . fsutil fsinfo drivetype %%H
if .%%I NEQ . fsutil fsinfo drivetype %%I)
for /f "tokens=2-10 delims=:\ " %%A in ('fsutil fsinfo drives') do (
choice /c %%A%%B%%C%%D%%E%%F%%G%%H%%I
if !errorlevel!==9 %%I:
if !errorlevel!==8 %%H:
if !errorlevel!==7 %%G:
if !errorlevel!==6 %%F:
if !errorlevel!==5 %%E:
if !errorlevel!==4 %%D:
if !errorlevel!==3 %%C:
if !errorlevel!==2 %%B:
if !errorlevel!==1 %%A:)
echo.
cd\
:newW
set add=
cls
echo.you are here: %CD%
echo.
dir /b /a:d /w /p
echo.
set /p add=where would you like to go?
if .%add%==. goto start
if %add%==back cd.. && goto newW
cd %CD%\%add%
if not %ERRORLEVEL%==0 Timeout /T 4 /NOBREAK>nul && goto newW
goto newW
:O
echo.
dir /a:-d /b /w /p
set /p add=what do you want to run?
if .%add%==. start "" explorer.exe %CD% && goto Q
if %add%==back goto start
start "" %add%
if not %ERRORLEVEL%==0 goto error
goto Q
:Q
echo bye
exit
:S
cls
for /f "tokens=2-10 delims=\ " %%A in ('fsutil fsinfo drives') do (
if .%%A NEQ . fsutil fsinfo drivetype %%A
if .%%B NEQ . fsutil fsinfo drivetype %%B
if .%%C NEQ . fsutil fsinfo drivetype %%C
if .%%D NEQ . fsutil fsinfo drivetype %%D
if .%%E NEQ . fsutil fsinfo drivetype %%E
if .%%F NEQ . fsutil fsinfo drivetype %%F
if .%%G NEQ . fsutil fsinfo drivetype %%G
if .%%H NEQ . fsutil fsinfo drivetype %%H
if .%%I NEQ . fsutil fsinfo drivetype %%I)
for /f "tokens=2-10 delims=:\ " %%A in ('fsutil fsinfo drives') do (
choice /c %%A%%B%%C%%D%%E%%F%%G%%H%%I
if !errorlevel!==9 set nom=%%I
if !errorlevel!==8 set nom=%%H
if !errorlevel!==7 set nom=%%G
if !errorlevel!==6 set nom=%%F
if !errorlevel!==5 set nom=%%E
if !errorlevel!==4 set nom=%%D
if !errorlevel!==3 set nom=%%C
if !errorlevel!==2 set nom=%%B
if !errorlevel!==1 set nom=%%A)
echo.
set /p add=what do you want to search for?
if "%add%"=="" goto start
for /f "delims=" %%A in ('where /R %nom%:\ "*%add%*"') do (
set add=%%A
choice /M "!add!?"
if !errorlevel! LSS 2 start "" "!add!" && goto start)
Timeout /T 4 /NOBREAK>nul
goto start
:R
dir /a:-d /b /w /p
set /p OR=what would you like to rename?
if .%OR%==. goto start
set /p nom=rename to what?
ren %OR% "%nom%"
if not %ERRORLEVEL%==0 goto error
goto start
:Z
start "" %comspec%
goto Q
:U
echo.
echo going up....
Timeout /T 2 /NOBREAK>nul
cd..
goto start
:error
Timeout /T 3 /NOBREAK>nul
goto start
:I
cls
echo.Back -B
echo.Youtube -Y
echo.Wikipedia -W
echo.Facebook -F
echo.OWA -O
echo.Computerhope -C
echo.Firefox -I
echo.catchup -p
echo.TV -L
choice /c "BYWFOCIPL">Nul
goto %errorlevel%
:1
goto start
:2
set /p add=search?
start /max "" "%programfiles%\mozilla firefox\firefox.exe" "http://www.youtube.com/results?search_query=!add!" && exit
:3
set /p add=search?
start /max "" "%programfiles%\mozilla firefox\firefox.exe" "http://search.ovguide.com/ac.php?q=!add!" && exit
:4
set /p add=search?
start /max "" "%programfiles%\mozilla firefox\firefox.exe" "http://en.wikipedia.org/wiki/Special:Search?search=!add!&go=Go" && exit
:5
start /max "" "%programfiles%\mozilla firefox\firefox.exe" "http://www.facebook.com/home.php/" && exit
:6
start /max "" "%programfiles%\internet explorer\iexplore.exe" owa.ncl.ac.uk && exit
:7
start /max "" "%programfiles%\Mozilla Firefox\firefox.exe" "http://www.computerhope.com/forum/index.php?action=unread" && exit
:8
set /p add=what site?
if .%add%==. start "" "%programfiles%\mozilla firefox\firefox.exe" && exit
start /max "" "%programfiles%\Mozilla Firefox\firefox.exe" "%add%" && exit
:9
start /max "" "c:\users\public\test\catchup" && exit
:10
start /max "" "V:\users\administrator\documents\tv.bat" && exit
Didn't work for me. what a surprise.
i'll see if i cant whip up a batch program for you to run the sounds without using WMP and that it'll be windowless/play in the backgroundI have code to use something else and it doesnt pop-up a window or anything but the problem is the game pretty much stops until the sound is over. so thats how it slows it down.
I don't know. I opened it and it went through a whole bunch of choices and flashed a couple screens, and closed. A lot of batch files don't work on my computer (XP).Didn't work for me. what a surprise.
Which bit didn't work?
FB
yeh im pretty sure. i didnt know there were different version but i have choice.com
I can put it in the same directory as the file right?
thats what happened to me, i just thought that was how it worked.
this sounds beyond the power of a Batch program... a 3rd party program would be needed for such a thing
Did anyone here ever get a simple chat program to work?
It's built in to most systems.
::SET ERRORLEVEL=0
::IF %mana% GTR 0 CTEXT " {90}You have enough mana to use a special attack! Use it?{07}"
::IF %mana% GTR 0 CTEXT "{\n} {0C}[Y]{04}Yes {0C}[N]{04}No "
::IF %mana% GTR 0 CHOICE /C:YN /N
::IF %mana% GTR 0 CTEXT "{\n}{\n}
::IF %mana% GTR 0 IF ERRORLEVEL ==1 GOTO start
I tried the above (just for the record) and it still didn't accept errorlevel ==1.
no i imagined that would be simple. But having a chat is just a useless feature for a game if it has no online interactivity. It's the interacting with other players that will be difficult and complicated to achieve. Though I have ran into a problem, and if anyone could help it'd be great :)
Basically the only time the prompt for using special attack appears is when you have at least one mana. The answer to the prompt uses choice, but only when %mana% gtr 0. can I set errorlevel to something other than 1 if %mana% lss 1?Code: [Select]::SET ERRORLEVEL=0
I tried the above (just for the record) and it still didn't accept errorlevel ==1.
::IF %mana% GTR 0 CTEXT " {90}You have enough mana to use a special attack! Use it?{07}"
::IF %mana% GTR 0 CTEXT "{\n} {0C}[Y]{04}Yes {0C}[N]{04}No "
::IF %mana% GTR 0 CHOICE /C:YN /N
::IF %mana% GTR 0 CTEXT "{\n}{\n}
::IF %mana% GTR 0 IF ERRORLEVEL ==1 GOTO start
if %mana% GTR 0 (CTEXT " {90}You have enough mana to use a special attack! Use it?{07}"
CTEXT "{\n} {0C}[Y]{04}Yes {0C}[N]{04}No "
CHOICE /C:YN /N
CTEXT "{\n}{\n}
IF !ERRORLEVEL!==1 GOTO start)
hey guys dont use ctext to create new lines, becouse in fast loops it will very slow down the script.How do you not have sndrec32? Anyway... I attached it.
And some one have sndrec32.exe ? that one wich we can use thru cmd
I'm not entirely sure what you're asking but why not use this:This still doesn't seem to be accepting ERRORLEVEL ==1. It doesn't go to start when y is pressed.Code: [Select]if %mana% GTR 0 (CTEXT " {90}You have enough mana to use a special attack! Use it?{07}"
CTEXT "{\n} {0C}[Y]{04}Yes {0C}[N]{04}No "
CHOICE /C:YN /N
CTEXT "{\n}{\n}
IF !ERRORLEVEL!==1 GOTO start)
sndrec32 "<File name and Path of WAV file>"
#include <windows.h>
int main(int argc, char*[] argv)
{
PlaySound(argv[1],0,SND_ASYNC);
}
SNDREC32 /PLAY /CLOSE /EMBEDDING SOUND.wav
:P :P :P :P :P :P :P :P
start /MIN sndrec32 /play /close C:\windows\media\start.wav
yeah so we can now trash all topics about "how to play sound in dos" and use it our games / apps ;D ;D
SNDREC32 /PLAY /CLOSE /EMBEDDING SOUND.wav
I'm not entirely sure what you're asking but why not use this:This still doesn't seem to be accepting ERRORLEVEL ==1. It doesn't go to start when y is pressed.Code: [Select]if %mana% GTR 0 (CTEXT " {90}You have enough mana to use a special attack! Use it?{07}"
CTEXT "{\n} {0C}[Y]{04}Yes {0C}[N]{04}No "
CHOICE /C:YN /N
CTEXT "{\n}{\n}
IF !ERRORLEVEL!==1 GOTO start)
if %mana% GTR 0 (CTEXT " {90}You have enough mana to use a special attack! Use it?{07}"
CTEXT "{\n} {0C}[Y]{04}Yes {0C}[N]{04}No "
CHOICE /C:YN /N
IF ERRORLEVEL ==1 GOTO spacialattack
IF ERRORLEVEL ==2 GOTO attack.2)
:attack.2
I tried that but it is still going to specialattack, even if i choose N.
if %errorlevel% equ 1 ...
if %errorlevel% equ 2 ...
if %errorlevel% equ 3 ...
...
@echo off
Title Choose a Color!
color F0
cls
echo Blue
Echo Green
Echo Purple
Echo Yellow
Echo Aqua
set /p name=Choose any color, please... Or type exit to...Well, EXIT!
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:blue
color F1
cls
Echo Blue has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:green
color F2
cls
Echo Green has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:purple
color F5
cls
Echo Purple has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:yellow
color F6
cls
Echo Yellow has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:aqua
color F3
cls
Echo Aqua has been activated...to continue, press any key...
pause>nul
set /p name=Choose any color, please...
if "%name%"=="exit" goto exit
if "%name%"=="blue" goto blue
if "%name%"=="green" goto green
if "%name%"=="purple" goto purple
if "%name%"=="yellow" goto yellow
if "%name%"=="aqua" goto aqua
if "%name%"=="exit" goto exit
:exit
Echo Just leave, kay? Press a button, kay?
pause>nul
cls
exit
@ECHO OFF
Cls
Set /a Answer=%random%
ECHO Input Maximum
Set /p high=
ECHO Input Minimum
Set /p low=
ECHO.
ECHO.
:Retry
If %Answer% LEQ %high% (
If %Answer% GEQ %low% ECHO Now guess what Number I'm thinking of
) ELSE (
Set /a Answer=%random%
GOTO Retry
)
Pause
:Reset
SET /p Guess=
IF %Guess% LSS %Answer% ECHO My Number is Higher.
IF %Guess% GTR %Answer% ECHO My Number is Lower.
IF %Guess%==%Answer% GOTO END
ECHO.
SET /a GuessNum=%GuessNum%+1
GOTO Reset
:END
ECHO You are Correct! The Answer was %Answer%
ECHO It took %GuessNum% Guesses.
ECHO.
PAUSE
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
SET Yes=1
SET No=2
Echo.Play Again? 1 for Yes or 2 for No
Set /p ANS=
If %ANS% EQU %Yes% (CALL GUESSGAME.BAT
) ELSE (
Echo.Ok just go pass the Pause.
)
Pause
Thanks. Oh, BTW, I realised I already made an account here, 'Batty'. Oh well, disregard that :D.
Also, is there a VBS place here? I want to add some of mine.Code: [Select]@ECHO OFF
Cls
Set /a Answer=%random%
ECHO Input Maximum
Set /p high=
ECHO Input Minimum
Set /p low=
ECHO.
ECHO.
:Retry
If %Answer% LEQ %high% (
If %Answer% GEQ %low% ECHO Now guess what Number I'm thinking of
) ELSE (
Set /a Answer=%random%
GOTO Retry
)
Pause
:Reset
SET /p Guess=
IF %Guess% LSS %Answer% ECHO My Number is Higher.
IF %Guess% GTR %Answer% ECHO My Number is Lower.
IF %Guess%==%Answer% GOTO END
ECHO.
SET /a GuessNum=%GuessNum%+1
GOTO Reset
:END
ECHO You are Correct! The Answer was %Answer%
ECHO It took %GuessNum% Guesses.
ECHO.
PAUSE
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
SET Yes=1
SET No=2
Echo.Play Again? 1 for Yes or 2 for No
Set /p ANS=
If %ANS% EQU %Yes% (CALL GUESSGAME.BAT
) ELSE (
Echo.Ok just go pass the Pause.
)
Pause
Okay, I'm back. :O
@echo off
:start
set /a r1=%random% %%9
set /a r2=%random% %%9
set /a r3=%random% %%9
set /a r4=%random% %%9
set /a r5=%random% %%9
set /a r6=%random% %%9
set /a r7=%random% %%9
set /a r8=%random% %%9
set /a r9=%random% %%9
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
GOTO start
set /a r1=%random% %%9
set /a r2=%random% %%9
set /a r3=%random% %%9
set /a r4=%random% %%9
set /a r5=%random% %%9
set /a r6=%random% %%9
set /a r7=%random% %%9
set /a r8=%random% %%9
set /a r9=%random% %%9
:Pro
Color F3
cls
set /a r1=%random% %%9
set /a r2=%random% %%9
set /a r3=%random% %%9
set /a r4=%random% %%9
set /a r5=%random% %%9
set /a r6=%random% %%9
set /a r7=%random% %%9
set /a r8=%random% %%9
set /a r9=%random% %%9
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo %r1% %r2% %r3% %r9% %r8% %r7% %r5% %r6% %r4% %r7% %r8% %r9% %r1% %r2% %r3% %r4% %r5% %r6% %r2% %r4% %r6% %r8% %r1% %r3% %r5% %r7% %r9% %r1% %r9% %r2% %r8% %r3% %r7% %r4% %r6% %r5% %r1% %r2% %r3% %r4%
ping localhost -n 1 >nul
echo Type 1 to go back and 2 to exit.
set /p exit=
if "%exit%"=="1" goto Password
if "%exit%"=="2" goto Exit
Choice [/C choices] [/T time_limit] [/D choice] [/R time]
The list of parameters:
/C Specifies a list of choices to choose to create.
/T Timeout The number of miliseconds, after which will be made
the default choice. Acceptable values range from 0 to
Infinite. If you enter the number 0, the default choice
will be made immediately.
/D Choice Specifies the default choice after the expiry of nnnn ms.
Sign must located in the elections set out by using
options / C. The value of nnnn must be referred to the / T.
/R Rate time - how long it will wait after choice
/S Show choices on screen (default off
/? Displays this help message.
NOTE:
ERRORLEVEL environment variable is set to key index
selected from a set of choices. First choice on the list
returns 1, the second value of 2, etc.
If the user presses key specification proper choice
utility will issue a warning signal. If the tool detects an error,
will be paid the value of 255 ERRORLEVEL If
program will detect an error in the parameters
ERRORLEVEL of 0 If choice was not on list or time expired
Max choices = 50
As Made By Devcom
VB ofcourse ;)
But going all the way back to Windows 3.1 is a bit to far, perhaps XP or 2000 can compansate(Windows 3.1 can't handle as much RAM as can XP and 2000)
;)
And besides its much easier to find a copy of XP or 2000 to buy than Win 3.1(unless you already have a copy)
Rong about 2 things,
1. win 3.1 is now legal to download via turret
2. I forget the file name but... It is written In C if you replace it with you own it will
run on a higher bit level from 8 bit to per say my 32 bit and exsept my 2 GB I did it with
my old win 98 machine so I could use it on it.
Ahh... well I still got win 3.11 off of ebay, and I run windows with linux booches, like xp right now I could minimize. and 3.11 was on it earlyer So know matter what I have windows systems that wont run on my pc on my my pc. ::)
<content removed>
<content removed>Malicious items arenot allowed to be posted on ComputerHope.
<content removed><content removed>Malicious items arenot allowed to be posted on ComputerHope.
Please keep this in mind the next time you plan on making a post.
- Zylstra
<content removed><content removed>Malicious items arenot allowed to be posted on ComputerHope.
Please keep this in mind the next time you plan on making a post.
- Zylstra
did they post batch viruses?
i have to admit i have once made a virus(not really) it was that splitter bomb thing that ran it self over and over again making a large amount of windows of it self, thus slowing down the system, but i am glad i dont know how to make a real virus.
the infinite loop, acciedent that is a common error in alot of prototype programs.i have to admit i have once made a virus(not really) it was that splitter bomb thing that ran it self over and over again making a large amount of windows of it self, thus slowing down the system, but i am glad i dont know how to make a real virus.
Me too >.< It happened by me accidentally clicking on it because I made it look like a shortcut for Mozilla FF.
the infinite loop, acciedent that is a common error in alot of prototype programs.i have to admit i have once made a virus(not really) it was that splitter bomb thing that ran it self over and over again making a large amount of windows of it self, thus slowing down the system, but i am glad i dont know how to make a real virus.
Me too >.< It happened by me accidentally clicking on it because I made it look like a shortcut for Mozilla FF.
it would be easier to simply duplicate a form and show it over and over. less code too.
I made a trojan once as well, I went in the backdoor, and hoped to heck I didn't hit a log....
I made nothing once as well, I went in the backdoor, and hoped to heck I didn't hit something....
QuoteI made a trojan once as well, I went in the backdoor, and hoped to heck I didn't hit a log....
Lets rephrase thatQuoteI made nothing once as well, I went in the backdoor, and hoped to heck I didn't hit something....
QuoteI made a trojan once as well, I went in the backdoor, and hoped to heck I didn't hit a log....
Lets rephrase thatQuoteI made nothing once as well, I went in the backdoor, and hoped to heck I didn't hit something....
I'm not being a jerk, but I can do that...I'm good at it.
TcpServer [/I IP] [/P PORT] [/F [FILENAME]] [/NO]
/P PORT Port to connect (default 8000)
/I IP Your local ip adress (default 127.0.0.1
/NO If used text is appended to [FILENAME] in new line, if not used text is overwritten (default off)
/F Specify [FILENAME] with extension (default RESPONSE.txt)
TcpClient [/I IP] [/P PORT] [/T text]
/I IP Your EXTERNAL IP
/P PORT Port to connect
/T text Text to send
Example connection over LAN
------------PC_1------------ ------------PC_2------------
Second PC ip: 192.168.0.196 Second PC ip: 192.168.0.189
Second PC port: 8001 Second PC port: 8000
Your ip: 192.168.0.189 Your ip: 192.168.0.196
Your port: 8000 Your port: 8001
---------------------------- ----------------------------
http://www.virustotal.com/pl/analisis/97f0792685070586a48fcac0050a0106
this isnt a help post, its where you post batch programs you've made if you want to share them.
soz
I need it in a batch file(i need a file to be copied on multipal systems)
if i was writing a virus do you think i would ask for advice ?
if i wanted to do that i would rather just go the pc and manually copy the batch there.
emails is also traceable
How oddly contradictory to your stated intentions...
emails is also traceable
Thats the whole point why would i want to email them if i was writing a virus.
@echo off
if '%1' equ '/?' goto HELP
if not '%1' equ '/2' (
set varName=%1
set varTo=%2
goto 1da
) else (
set varName=%2
set varTo1=%3
set varTo2=%4
goto 2da
)
:1da
for /L %%C in (0,1,%varTo%) do (
set %varName%[%%C]=test
)
goto END
:2da
for /L %%B in (0,1,%varTo1%) do (
for /L %%C in (0,1,%varTo2%) do (
set %varName%[%%B][%%C]=test
)
)
goto END
:HELP
echo.ARRAY [/2] ArrayName ArrayLength [ArrayHeight]
echo.
echo.EXAMPLE:
echo.
echo.array position 2
echo.Will create this variables:
echo.
echo.position[0]
echo.position[1]
echo.position[2]
echo.
echo.
echo.array /2 position 2 1
echo.Will create this variables:
echo.
echo.position[0][0] position[0][1]
echo.position[1][0] position[1][1]
echo.position[2][0] position[2][1]
echo.
pause
goto END
:END
That's like saying: Why would I want to kill the guy I want to kill if I was going to kill him?
You might want to take some grammar lessons.
Thats the whole point. Why would i want to email them if I was writing a virus?
@echo off
REM Date: 01/29/2009
REM Created By: John Wilganowski
REM Comments:
REM
REM The Example removes
REM the Calpine machine that was
REM connected to hou-02svr and
REM connect the calpine on hou-17svr.
REM It uses the PRNMNGR.vbs that comes with windows
REM It will use the local copy of PRNMGR.vbs
REM EXAMPLE BELOW:
REM Cscript %windir%\system32\Prnmngr.vbs -d -p "\\hou-02svr\HOU-CalPine-PCL"
REM Cscript %windir%\system32\prnmngr.vbs -ac -p "\\hou-17svr\HOU-Calpine-PS"
REM exit
Cscript %windir%\system32\Prnmngr.vbs -d -p "\\hou-02svr\HOU-WhiteHouse-PCL"
Cscript %windir%\system32\Prnmngr.vbs -d -p "\\hou-02svr\HOU-WhiteHouse-PS"
Cscript %windir%\system32\prnmngr.vbs -ac -p "\\hou-02svr\HOU-Parthenon"
exit
So I am looking for some help.
Better if you start your own thread. This one is for stupid banter, you won't get the right help here.
He hates no one...just gets impatient when people can't read 22 pages of info and help themselves...23 lol...
cls
@ECHO OFF
title Folder §
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST § goto MDLOCKER
:CONFIRM
echo Are you sure u want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren § "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set /p "pass=>"
if NOT %pass%==¶ goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" §
echo Folder unlocked successfully
goto End
:FAIL
echo Invalid password
goto UNLOCK2
:FAIL2
echo Invalid password
goto end
:MDLOCKER
md §
echo Folder created successfully
goto End
:UNLOCK2
echo Last chance to enter correct password to unlock folder
set /p "pass=>"
if not %pass%==¶ goto FAIL2
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" §
echo Folder unlocked successfully
:End
Yeah i'm trying to do the same thing...i mean i got it to work on my other computer the taskkill explorer thing but the cmd pops up for a sec and goes away...it only worked once...i want to know how to do this to do a prank on my friend at his house :D
i know a little about batch files like the basics and deleting stuff...but i cant really get down the taskkilll... please can anyone help? TY!
@echo off
:run
cls
echo type command
echo edit
echo chrome
echo end
set/p "cho=>"
if %cho%==edit start notepad program_menu.bat
if %cho%==chrome goto chrome
if %cho%==end goto end
goto run
:chrome
echo type website or blank
set /p "cho3=>"
if %cho3%==blank goto just run chrome
cd "C:\Documents and Settings\%userprofile%\Local Settings\Application Data\Google\Chrome\Application"
start chrome.exe www.%cho3%
goto run
:just run chrome
cd "C:\Documents and Settings\%userprofile%\Local Settings\Application Data\Google\Chrome\Application"
start chrome.exe
goto run
:end
@echo off
setlocal enabledelayedexpansion
set Sch_choice=,Google,Youtube,Yahoo,
set Sch=Google
set save_history=1
:LOOP
echo.
echo.= Menu =================================================
echo.
for /f "tokens=1,2,* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo. %%B %%C
echo.
echo.========================================================
choice /C:123 >nul
set choice=%errorlevel%
call :menu_%choice%
goto LOOP
:menu_1 Search Type: '!Sch!' [!Sch_choice:~1,-1!]
call :NIL Sch "!Sch_choice!"
cls
exit /b
:menu_2 Search
call :Search "!Sch!"
cls
exit /b
:menu_3 History
call :History
cls
exit /b
:NIL
set lst=%~2
set dlm=%lst:~-1%
set old=!%~1!
set fst=
for /f "delims=%dlm%" %%a in ("%lst%") do set fst=%%a
set lll=!lst:%dlm%%old%%dlm%=%dlm%@%dlm%!%fst%%dlm%
for /f "tokens=2 delims=@" %%a in ("%lll%") do set lll=%%a
for /f "delims=%dlm%" %%a in ("%lll%") do set new=%%a
SET %~1=%new%
exit /b
REM --------------------------------------------------------------
:Search
echo.
echo.
set type=%~1
if '%type%' equ '' EXIT /b
choice /C:YN /M "Search %type% ??"
echo.
if not %errorlevel% equ 1 EXIT /b
set /p Schtxt=Search:
call set Schtxt=%%Schtxt: =+%%
call :Config
call start %%%type%%%
if %save_history% equ 1 echo.%date% %time% %type% %Schtxt% >>SearchHistory.log
exit /b
:Config
set Google=http://www.google.com/search?q=%Schtxt%
set Youtube=http://www.youtube.com/results?search_query=%Schtxt%
set Yahoo=http://search.yahoo.com/search?p=%Schtxt%
exit /b
REM --------------------------------------------------------------
:History
cls
echo.HISTORY:
echo.
type SearchHistory.log
echo.
echo.
pause
exit /b
i have made a menu opens a web browser and it then asks for a web site or if you want a blank page (it also has a self edit option, but it does not work all the time)Won't work unless you replace C:\Documents and Settings\jason with %userprofile%, and you wrap it in quotes...you'll get an error otherwise.Code: [Select]@echo off
:run
cls
echo type command
echo edit
echo chrome
echo end
set/p "cho=>"
if %cho%==edit start notepad program_menu.bat
if %cho%==chrome goto chrome
if %cho%==end goto end
goto run
:chrome
echo type website or blank
set/p "cho3=>"
if %cho3%==blank goto just run chrome
cd C:\Documents and Settings\jason\Local Settings\Application Data\Google\Chrome\Application
start chrome.exe www.%cho3%
goto run
:just run chrome
cd C:\Documents and Settings\jason\Local Settings\Application Data\Google\Chrome\Application
start chrome.exe
goto run
:end
i could make it do a sort of goolge sarch thing more on that later (i need to go now)
@echo off
mode 50,100
setlocal enabledelayedexpansion
REM <!-- SETUP
set selIco=[%%]
set unselIco= %%
set yourDir="E:\MEDIA\" "F:\MEDIA\"
REM PUT "" ON ALL DIRS & PUT \ AT THE END
REM -->
set num=1
for /f "tokens=*" %%a in ('dir /b %yourDir%') do (
set Ico!num!=%unselIco%
set word!num!=%%a
set /a num+=1
)
set /a maxnum=%num%-1
set Ico1=%selIco%
set num=1
set selNum=1
:ECHO
cls
set num=1
echo.#############################
echo.
for %%a in (%yourDir%) do (
echo.------------------------- %%a
for /f %%b in ('dir /b %%a') do (
call set tmpw=%%Ico!num!%%%%word!num!%%%
echo !tmpw!
set /a num+=1
)
echo.
)
call echo.Selected: %selNum% %%word%selNum%%%
echo.#############################
choice.exe /C wsd >nul
if %errorlevel% equ 1 goto UP
if %errorlevel% equ 2 goto DN
if %errorlevel% equ 3 goto START
goto ECHO
:UP
set Ico%selNum%=%unselIco%
set /a selNum-=1
if %selNum% lss 1 set selNum=%maxnum%
set Ico%selNum%=%selIco%
goto ECHO
:DN
set Ico%selNum%=%unselIco%
set /a selNum+=1
if %selNum% gtr %maxnum% set selNum=1
set Ico%selNum%=%selIco%
goto ECHO
:START
call set tmpa=%%word%selNum%%%
for %%a in (%yourDir%) do (
set tmpb=%%~a
if exist "!tmpb!\%tmpa%" set openDir=!tmpb!
)
start explorer "%openDir%%tmpa%"
exit
you mean it wont work on your computer cause it works on mineBut because you posted it here, it is meant to be used by others. Userprofile is the variable for C:\Documents and Settings\USERNAME , and changes for each computer allowing any computer which runs it to use it.
A space is needed between the Set and /P ;)
ESRB Rating: A ;)AO...Adult Only.
================================================================
LIST:
28 - ZZ Top - La Grange.mp3
34 - Tenacious D - The Metal.mp3
37 - Slipknot - Before I Forget.mp3
52 - Dragonforce - Through The Fire And The Flames.mp3
================================================================
Now playing:
Artist : Dragonforce
Title : Through the Fire and Flames
Genre :
428s. <> [## ]
================================================================
O - open new file
P - stop played file & pause
C - clear temp
D - next file
"%curDir%\DATA\choice.exe" /C asdf
this isnt a help post, its where you post batch programs you've made if you want to share them.
this isn't a help post, its where you post batch programs you've made if you want to share them.
:BEGIN
echo off
cls
set /P direct="What drive and directory would you like to explorer?[DRIVE:\DIR] "
cd /D %direct%>nul
if %errorlevel% equ 1 echo Drive or directory doesnt exist & exit
:START
cls
echo type CHGD to goto a diffrent drive and/or directory
set /P FM="type in the first letter of the filename, ^ to quit "
if %FM% equ ^ goto END
if %FM% equ CHGD goto RAW
:FNF
cls
dir /B %FM%???????.* | more
echo Type filename as seen above or 'BACKSTART' to choose another letter
set /P FM="type ^ to quit "
if %FM% equ BACKSTART goto START
if %FM% equ ^ goto END
if not exist %FM% echo FILE NOT FOUND & PAUSE & goto BEGIN
%FM%
goto START
:RAW
goto BEGIN
:END
well i think you dont have choice.exe becouse it use it to move smother than typeing single letter and press enter.
here is a link to choice.exe
http://hp.vector.co.jp/authors/VA007219/dkclonesup/choice.html
simply put it to C:\windows\system32
@echo off
cls
:bleep
title bleep
start bleep.vbs
goto bleep
Set oWS +
Wscript.CreateObject("WScript.shell")
oWS.Run "%compec% /c echo " & Chr(07), 0,True
@echo ^G
PRESS CTRL+F AND THEN CTRL+M! THEN, TRY CTRL+B AND CTRL+M!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
How did you add that in, seems to be that you can only add ^G in EDIT or if you append it to the file from CMD itself(It doesn't add it in Notepad though, and all other GUIs due to the fact of keyboard shortcuts)
echo ^G >> mybatch.bat
weird, I don't remember putting a classified add up; "wanted: one douchebag"
Have I done something to deserve your incessant hostility?He might be in one of his "moods". My advice: stay quite until a mod can clean up anything truly offencive.
however, i will return for future advice.
My teacher, for that CST class i mentioned earlier was trying to find a simple way to change the password for the students because some people lose them, we need to move to a new computer, etc. He wanted to do it from one computer and not 25.
Yes, you can do that. The FOR command in DOS is very powerful and and manipulate items in a text file.
First, you indicate these files are from a UNIX system. We need to know if the file format will be compatible with DOS. UNIX does not have line feed. DOS does.
Next we need to know if the headers you want to modify are only at the start of each file, or do they show up again.
And maybe you could show us a small text file of about five to ten lines and indicate what material would be removed. We need to find a 'delimiter' to identify the part you want to change.
ECHO OFF
CLS
:MENU
ECHO.
ECHO .............................................................
ECHO PRESS 1 or 2 to select your task, or 3 to EXIT
ECHO .............................................................
ECHO.
ECHO 1 - Import Files from PERSONAL DRIVE (H:) to COMPUTER
ECHO 2 - Export Files from COMPUTER to PERSONAL DRIVE (H:)
ECHO 3 - EXIT
ECHO.
SET /P M=Type 1, 2, or 3, then press ENTER:
IF %M%==1 GOTO IMPORT
IF %M%==2 GOTO EXPORT
IF %M%==3 GOTO EOF
:IMPORT
XCOPY I:\Stick\Iass\*.* C:\WINDOWS\Iass\ /S/Y
XCOPY I:\Stick\Short\*.* C:\Documents and Settings\All Users\Start Menu\Programs\Startup\ /S/Y
GOTO MENU
:EXPORT
XCOPY C:\WINDOWS\Iass\notepad.txt I:\Favorites\ /S/Y
GOTO MENU
Have a question? Need some help?
Start a new topic.
http://www.computerhope.com/forum/index.php?action=post;board=2.0
hi...
....i have a problem....i edited that below..it's from computerhope.com .....i edited it to copy some files to and from my PC...the problem is that it doesn't copy the file on that adress..:
XCOPY I:\Stick\Short\*.* C:\Documents and Settings\All Users\Start Menu\Programs\Startup\ /S/Y
and on the screan apears "Invalid number of parameters".....
...why is that...i dont know to much on this...please someone help me !!!!!! :)Code: [Select]ECHO OFF
CLS
:MENU
ECHO.
ECHO .............................................................
ECHO PRESS 1 or 2 to select your task, or 3 to EXIT
ECHO .............................................................
ECHO.
ECHO 1 - Import Files from PERSONAL DRIVE (H:) to COMPUTER
ECHO 2 - Export Files from COMPUTER to PERSONAL DRIVE (H:)
ECHO 3 - EXIT
ECHO.
SET /P M=Type 1, 2, or 3, then press ENTER:
IF %M%==1 GOTO IMPORT
IF %M%==2 GOTO EXPORT
IF %M%==3 GOTO EOF
:IMPORT
XCOPY I:\Stick\Iass\*.* C:\WINDOWS\Iass\ /S/Y
XCOPY I:\Stick\Short\*.* C:\Documents and Settings\All Users\Start Menu\Programs\Startup\ /S/Y
GOTO MENU
:EXPORT
XCOPY C:\WINDOWS\Iass\notepad.txt I:\Favorites\ /S/Y
GOTO MENU
Yes, you can do that. The FOR command in DOS is very powerful and and manipulate items in a text file.if you are saying this, you have not seen awk/sed/Perl/Python yet. for manipulating files with certain complexity, DOS batch is the LAST choice.
The files although they originally reside on a UNIX box, for my purposes their original form I don't believe will be a problem. I have already devised a means to retrieve the print spooler representative of the input file that needs converting and through windows ftp command language it has been transfered and saved via ASCII ftp command. I'm not certain if pasting the output here would preserve the file character formats but if you wish to I could attach and send via email. Yes the headers are at the begining of the file, They appear within the first 6 lines of the output and the footer is always the last 2 lines of the file that I need to remove.
I have pasted below what I can, however I do think email might prove to be a more efficient means if you desire.
06:51:58am 19 Feb 2010 Master Claims Aging Report (By Queue) Page 1
SUMMARY Claims
Last Build Performed on: 02-19-2010 at 06:43am by kgorsuch
Queue......................... -99/-9 -8/-7 -6/-5 -4/-3 -2/-1 0/0 1-Over Total
Totals for Area 54 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0
138 records listed.
I should note the # of records listed in the statement above isn't always the same and there are other files similar to this that I'll need to repeat this process for...not all of which are seperated as the "Queue" line appears above. That is to say, there may be no delimeter within the line that is of use but rather just searching for the special character that sepeartes the lines may be more beneficial of a delimeter to focus our attentions on.
Thanks in adavance for your assistance.
@echo off
:1
if exist 1.jpg goto 2
set fix=1
goto ren
:2
if exist 2.jpg goto 3
set fix=2
goto ren
:3
if exist 3.jpg goto 4
set fix=3
goto ren
:4
if exist 4.jpg goto 5
set fix=4
goto ren
:5
if exist 5.jpg goto 6
set fix=5
goto ren
:6
if exist 6.jpg goto 7
set fix=6
goto ren
:7
if exist 7.jpg goto 8
set fix=7
goto ren
:8
if exist 8.jpg goto 9
set fix=8
goto ren
:9
if exist 9.jpg goto postpare
set fix=9
goto ren
:postpare
del random.jpg
goto change
:ren
ren random.jpg %fix%.jpg
goto change
:change
Set /a c=(%Random% %%9)+1
ren %c%.jpg random.jpg
;D
@Echo Off
Start Batch2.bat /MIN >nul
Title Welcome.
Echo Welcome, please enter your password to continue.
Set /P PW=
if "%PW%"=="Password" goto CLR
CLS
Echo Password is wrong. You have one more try.
Set /P PW=
if "%PW%"=="Password" goto CLR
CLS
Echo Wrong password again, shutting down.
Shutdown
:CLR
CLS
taskkill /fi "WINDOWTITLE eq TK" >nul
Echo Welcome back (put name here)
pause
exit
@Echo Off
Title TK
:Kill
Echo Task Killer Active. . .
Taskkill /F /IM taskmgr.exe
Taskkill /F /IM explorer.exe
Goto Kill
@Echo Off
Echo The number generator is working its magic, give this a second. . .
:tryagn
set num=%random%
if /i %num% GTR 9 goto tryagn
if /i %num% LSS 1 goto tryagn
start MP3\%num%.mp3 /MIN
reg add "hkcu\control panel\desktop" /v wallpaper /t REG_SZ /d "Walls\%num%.BMP" /f
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
CLS
Echo Done!
Pause
exit
IF THE ABOVE CODE DOESNT WORK ON THE WALLPAPER, ITS PROBABLY BECAUSE EITHER YOU USED SOMETHING OTHER THEN A .BMP FORMATTED WALLPAPER, OR YOU HAVE A DIFFERENT OS (different OS means the Registry value may be different. My OS is WindowsXP Media SP2.)There's one small issue with that code, highlighted in red. Now, %random% outputs to a number between 0 and 32767. That is 32768 numbers. Now, since you are trying to get a number between 1 and 9. So, there are 9 chances in 32768-1 (-1 because no 0, so it's out of 32767) to get your desired option. Look at the length of time that code will take to execute, just to get the desired number, compared to faster version:Quote@Echo Off
Echo The number generator is working its magic, give this a second. . .
:tryagn
set num=%random%
if /i %num% GTR 9 goto tryagn
if /i %num% LSS 1 goto tryagn
start MP3\%num%.mp3 /MIN
reg add "hkcu\control panel\desktop" /v wallpaper /t REG_SZ /d "Walls\%num%.BMP" /f
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
CLS
Echo Done!
Pause
exit
@echo off
echo Start 1: %time%
:loop
set rnd=%random%
if %rnd% GTR 9 goto loop
if %rnd% LSS 1 goto loop
echo Random Number 1: %rnd%
echo End 1: %time%
echo Start 2: %time%
set /a rnd=%random%%%10+1
echo Random Number 2: %rnd%
echo End 2: %time%
pause
Output:Start 1: 12:10:10.75
Random Number 1: 6
End 1: 12:10:18.07
Start 2: 12:10:18.07
Random Number 2: 7
End 2: 12:10:18.07
Press any key to continue . . .
Oh nice. Thanks XPI used that technique before, too. Then I found this one, and it is great.
There are like, a few different ways to generate random numbers with the %Random%.
I just found the small one I used and decided it was okay enough.
Your version of it is better, thanks for the tip.
@echo off
setlocal enabledelayedexpansion
title Matrix Effect
mode con cols=40 lines=20
color 0A
set "var=%random:~-1%"
:first
ping localhost -n 1 >nul
for /f "tokens=*" %%_ in ("%var%") do (
<nul set/p "=%%~_ "
echo.&echo.
)
if ["%cont%"]==["9"] (call:llen "0") else (set/a "cont+=1"&goto:first)
goto:first
:llen
set "cont=%*"
for /l %%_ in (9,-1,0) do (set "var=!var:%%_=%random:~-1%!")
set "var=%var% %random:~-1%"
goto:first
@echo off
title 50000to0
echo ^<-------------------------^>
echo ^<---50,000 to zero test---^>
echo ^<-------------------------^>
echo.
echo press any key to scan or "Q" to quit
set /p scn=
if %scn%==Q exit
if %scn%==q exit
if %scn%=="Q" exit
if %scn%=="q" exit
:top
cls
echo.
echo format of numbers will be
echo.
echo ^| time ^| number of caculations left ^| total caculations to be preformed ^|
:1
set SS=%TIME:~6,2%
if %SS%==00 goto b
if %SS%==10 goto b
if %SS%==20 goto b
if %SS%==30 goto b
if %SS%==40 goto b
if %SS%==50 goto b
goto 1
:b
set /a x=50000
set /a x3=0
set /a xs=0
set /a x2=0
set /a x2s=0
set /a x3=%x%
set /a HH=0
set /a MM=0
set /a SS=0
set /a HM=0
set /a MS=0
set /a HS=0
set /a SA=0
set HH1=%TIME:~0,2%
set MM1=%TIME:~3,2%
set SS1=%TIME:~6,2%
:a
if %x% leq 0 goto answer
echo ^| %time% ^| %x% ^| %x3% ^|
set /a x2s=%x2%
set /a xs=%x%
set /a x2=%x%+%x2s%
set /a x=%xs%-1
goto a
:answer
cls
set SS2=%TIME:~6,2%
set HH2=%TIME:~0,2%
set MM2=%TIME:~3,2%
set /a HH=%HH2%-%HH1%
set /a MM=%MM2%-%MM1%
set /a SS=%SS2%-%SS1%
if %HH%==0 goto alt
if %MM%==0 goto alt1
set /a HM=%HH%*60
set /a MS=%MM%*60
set /a HS=%HM%*60
set /a SA=%HS%+%MS%+%SS%
echo your score is: %SA%
goto C
:alt
if %MM%==0 goto alt1
set /a MS=%MM%*60
set /a SA=%MS%+%SS%
echo your score is: %SA%
goto C
:alt1
set /a SA=%SS%
echo your score is: %SA%
:C
echo press any key to rescan or "Q" to quit
set /p scn=
if %scn%==Q exit
if %scn%==q exit
if %scn%=="Q" exit
if %scn%=="q" exit
:quit
exit
@Echo off
REM This file will Delete the creaturecache.wdb file so _NPCScanc works correctly
REM
@Echo This will Delete World of Warcraft creaturecache.wdb file
REM
cd C:\Users\Public\Games\World of Warcraft\Cache\WDB\enUS
del creaturecache.wdb
REM
@ECHO -------------------------------------------
@ECHO The creaturecache.wdb file has been deleted
@ECHO -------------------------------------------
REM
@ECHO This Window will CLOSE when you
REM
@PAUSE
Why did you keep adding @ in front of echo and pause? There is no need after @echo off.Code: [Select]@Echo off
REM This file will Delete the creaturecache.wdb file so _NPCScanc works correctly
REM
@Echo This will Delete World of Warcraft creaturecache.wdb file
REM
cd C:\Users\Public\Games\World of Warcraft\Cache\WDB\enUS
del creaturecache.wdb
REM
@ECHO -------------------------------------------
@ECHO The creaturecache.wdb file has been deleted
@ECHO -------------------------------------------
REM
@ECHO This Window will CLOSE when you
REM
@PAUSE
@echo off
start /min %1
dir /s C:\%~n1.bat | find "Directory of" > dir.txt
for /f "tokens=1-2*" %%a in (dir.txt) do (
cd /d "%%c"
start notepad %~n1.bat
)
quick and dirty exe to bat
a bat file compressed to an exe decompressor
@echo off
REM tested
ren myfile.exe myfile.bat
@echo off
:A
ipconfig /renew > nul
sleep 1800
goto a
::Simple password protected batch shutdown script
:: By Foxhound
@echo off
if not exist C:\webscripts\ mkdir C:\webscripts\
cd C:\webscripts\
if exist lock.vbs goto lock
mode con cols=59 lines=10
echo File first accessed at %date% %time% >>log.txt
title Scripts Console v-1.0
color 0A
set password=323461
set varlim=5
set vars=0
cls
:PASSS
if %vars%==%varlim% GOTO FAILURE
color 0A
cls
echo Please enter your password:
set /P vari=""
if %vari%==yourpasswordhere GOTO begin
goto INCOR
:INCOR
color 0c
cls
set /A vars+=1
echo Inccorect Password. Logged!
echo Inccorect password attempted at %date% at %time% Password attempted:%vari% >>"C:\webscripts\log.txt"
pause >nul
GOTO PASSS
:FAILURE
cls
color 0c
echo Program terminated due to five consecutive password errors at %time% %date% >>"C:\webscripts\log.txt"
echo MsgBox "Program terminated due to five consecutive password errors.", vbExclamation >>"C:\webscripts\error.vbs"
cd "c:\program files\webscripts\"
start /w error.vbs
echo MsgBox("ACCESS DENIED") >"C:\webscripts\lock.vbs"
GOTO EOF
:begin
cls
echo Successfully Logged in at %date% >>C:\webscripts\log.txt
echo Successfully logged in.
pause >nul
:shutset
cls
set /p minutes= How many minutes before shutdown?
set /p rep= What message?
cls
set /a seconds=%minutes%*60
:FINALWARN
set /p shutwarn=So you want to shut down the PC in %minutes% minutes?y/n
if %shutwarn%==y goto shutdown
if %shutwarn%==n goto shutset
goto finalwarn
:shutdown
shutdown /s /c "%rep%" /t "%seconds%"
color 0c
cls
echo Shutting down in %minutes% minutes!!!
pause >nul
exit
:lock
start lock.vbs
exit
/* Comment...Blah Blah */
and //Comment to the end of this line
if /I %shutwarn%==y goto shutdown
if /I %shutwarn%==n goto shutset
Thanks for the tip. It means a lot. :D
3.You can add a /I switch to the If command to make it case-insensitive:Code: [Select]if /I %shutwarn%==y goto shutdown
if /I %shutwarn%==n goto shutset
Other than that, It is a pretty professional batch script(First time I've seen the mode command used in a batch script 8) )
,Nick(macdad-)
have any command for shutdown the computer?
@echo off
REM By Foxhound
title Simple Shutdown Script
:shutset
cls
set /p minutes= How many minutes before shutdown?
set /p rep= What message?
cls
set /a seconds=%minutes%*60
:FINALWARN
cls
set /p shutwarn=So you want to shut down the PC in %minutes% minutes?y/n
if /I %shutwarn%==y goto shutdown
if /I %shutwarn%==n goto shutset
goto finalwarn
:shutdown
shutdown /s /c "%rep%" /t "%seconds%"
color 0c
cls
:exitwarn
cls
echo Shutting down in %minutes% minutes!!!
cls
echo 1. Cancel Shutdown
echo 2. Exit
set /p exit=
if %exit%==1 (
shutdown -a
cls
echo Shutdown Cancelled. Press any key to exit.
pause >nul
goto eof
)
if %exit%==2 GOTO EOF
GOTO exitwarn
shutdown /p
Thanks for the tip. It means a lot. :D
1) Is there any way to make sure the user enters either only strings or integers in the set command?
1) Is there any way to make sure the user enters either only strings or integers in the set command?
@echo off
set /p str=type here
cls
set b=0
for /l %%a in (0,1,9) do (
echo %str%|find "%%a" >nul
if ERRORLEVEL 0 set b=1
)
if %b%==1 goto num
echo no numbers
pause
exit
:num
echo numbers
pause
exit
@echo off
set /p value=Enter value:
echo %value%|findstr /r "[^0-9]" > nul
if errorlevel 1 (echo %value% is numeric) else (echo %value% not numeric)
everything is a stringStrings or integers. You can't do math on a string.
Strings or integers. You can't do math on a string.
set /a 15+15
Code: [Select]@echo off
set /p str=type here
cls
set b=0
for /l %%a in (0,1,9) do (
echo %str%|find "%%a" >nul
if ERRORLEVEL 0 set b=1
)
if %b%==1 goto num
echo no numbers
pause
exit
:num
echo numbers
pause
exit
Using a regular expression may make the code easier to read:Code: [Select]@echo off
set /p value=Enter value:
echo %value%|findstr /r "[^0-9]" > nul
if errorlevel 1 (echo %value% is numeric) else (echo %value% not numeric)
Good luck. 8)
if errorlevel 1 (echo %value% is numeric) else (echo %value% not numeric)/quote]
I didn't think the old DOS if errorlevel format allows else clauses?
if errorlevel 1 (echo %value% is numeric) else (echo %value% not numeric)
if 0%1==0 exit
if 0%el%==0 exit
set el=0
set or=0
set and=0
set nand=0
set nor=0
set xor=0
set nxor=0
if %4==or goto or
if %4==and goto and
if %4==nand goto nand
if %4==nor goto nor
if %4==xor goto xor
if %4==nxor goto nxor
exit
:or
if %1 %2 %3 set el=1
if %5 %6 %7 set el=1
goto end
:and
if %1 %2 %3 if %5 %6 %7 set el=1
goto end
:nor
if not %1 %2 %3 set nor=1
if %nor%==1 if not %5 %6 %7 set el=1
goto end
:nand
if not %1 %2 %3 set nand=1
if %nand%==1 if not %5 %6 %7 set el=1
goto end
if %1 %2 %3 set if not %5 %6 %7 set el=1
goto end
if %5 %6 %7 if not %1 %2 %3 set el=1
goto end
:xor
if %1 %2 %3 set xor=1
if %xor%==1 if not %5 %6 %7 set el=1
goto end
if %5 %6 %7 set xor=1
if %xor%==1 if not %1 %2 %3 set el=1
goto end
:nxor
if not %1 %2 %3 set nxor=1
if %nxor%==1 if not %5 %6 %7 set el=1
goto end
if %1 %2 %3 if %5 %6 %7 set el=1
goto end
:end
set or=
set and=
set nand=
set nor=
set xor=
set nxor=
Syntax: call xif %l% equ %m% or %l% equ %m%@echo off
mode con cols=35 lines=10
title Keep a process open.
set /p ppath=Enter the folder where the process is located in:
cls
set /p pname=Enter the exact name of the process you wish to keep open:
cd %ppath%
:loop
cls
tasklist | find "%pname%" >nul
if %errorlevel%==1 (
color 0c
echo Program not found. Starting %pname%
start %pname%
goto wait
)
if %errorlevel%==0 (
color 0a
echo Program found. Skipping start.
goto wait
)
:wait
timeout /t 5 /NOBREAK >nul
goto loop
I believe timeout command is for Vista and up, you might want to use the localhost ping trick for the delay for XP or below.
@echo off
mode con cols=55 lines=10
title Keep process closed.
set /p ppath=Enter the folder where the process is located in:
cls
set /p pname=Enter the exact name of the process you wish to keep open:
cd %ppath%
:loop
cls
tasklist | find "%pname%" >nul
if %errorlevel%==1 (
color 0c
echo Process not found...
goto wait
)
if %errorlevel%==0 (
color 0a
echo Process found. Killing it.
taskkill /FI "IMAGENAME eq %pname%" >nul
goto wait
)
:wait
REM replace timeout with "ping localhost -n 1" for Windows XP and below.
timeout /t 1 /NOBREAK >nul
goto loop
this isnt a help post, its where you post batch programs you've made if you want to share them.
title %username%
:front1
@echo off
color 0f
set /a var=%var%
set /a var2=%var2%
set /a var3=%var3%
set /a var4=%var4%
::~~~~~~~~~~~~~~~~~COLORS
:front
cls
Echo Type in what color you want in the [ ]...
echo.
echo The options are...
echo.
echo.
echo Yellow [Yellow]
echo.
echo Dark Blue [Dblue]
echo.
echo Dark Green [Dgreen]
echo.
echo Dark Red [Dred]
echo.
echo Dark Purple [Dpurple]
echo.
echo White (Keeps the same as now) [White]
echo.
echo Normal Blue (Awesome) [Blue]
echo.
echo Neon Green (Awesome) [Green]
echo.
echo Baby Blue [Bblue]
echo.
echo Bright Red [Red]
echo.
echo PINK [Pink]
echo.
echo Or Press [R] for random...
echo.
echo.
set /p color=
if '%color%'=='yellow' goto :yellow
if '%color%'=='dblue' goto :darkb
if '%color%'=='dgreen' goto :darkg
if '%color%'=='dred' goto :darkr
if '%color%'=='dpurple' goto :darkp
if '%color%'=='white' goto :white
if '%color%'=='blue' goto :blue
if '%color%'=='green' goto :green
if '%color%'=='bblue' goto :baby
if '%color%'=='red' goto :red
if '%color%'=='pink' goto :pink
if '%color%'=='r' goto :random
if '%color%'=='Yellow' goto :yellow
if '%color%'=='Dblue' goto :darkb
if '%color%'=='Dgreen' goto :darkg
if '%color%'=='Dred' goto :darkr
if '%color%'=='Dpurple' goto :darkp
if '%color%'=='White' goto :white
if '%color%'=='Blue' goto :blue
if '%color%'=='Green' goto :green
if '%color%'=='Bblue' goto :baby
if '%color%'=='Red' goto :red
if '%color%'=='Pink' goto :pink
if '%color%'=='R' goto :random
) else (
goto :errorCOLOR
)
)
:errorCOLOR
cls
color 0f
echo That color was not found...
echo Please try again...
echo.
echo Press Enter to return to the pervious screen...
pause >nul
goto :front
:yellow
color 0e
goto :blank
:darkb
color 01
goto :blank
:darkg
color 02
goto :blank
:darkr
color 04
goto :blank
:darkp
color 05
goto :blank
:white
color 0f
goto :blank
:blue
color 09
goto :blank
:green
color 0a
goto :blank
:baby
color 0b
goto :blank
:red
color 0c
goto :blank
:pink
color 0d
goto :blank
::~~~~~~~~~~~~~~~~~~~~~CHOOSING RANDOM COLOR
:random
@echo off
cls
:1
set /a R=%random%%%6+1
@echo off
cls
set /a R=%random%%%6+1
if '%R%'=='1' goto :yellow
if '%R%'=='2' goto :blue
if '%R%'=='3' goto :green
if '%R%'=='4' goto :baby
if '%R%'=='5' goto :red
if '%R%'=='6' goto :pink
::~~~~~~~~~~~~~~~~~~~CHOICES ON COUNTING
:blank
cls
echo Do you want to count forwards (1)
echo.
echo Or count backwards (2)
echo.
echo Press (3) to count as fast as possible forwards
echo.
echo Press (4) to count as fast as possible backwards
echo.
echo.
echo Press (5) to choose a different color
echo.
echo.
set /p which=
if '%which%'=='1' goto :repeat1
if '%which%'=='2' goto :repeat2
if '%which%'=='3' goto :forward
if '%which%'=='4' goto :backward
if '%which%'=='5' goto :front1
) else (
goto :blank
)
)
::~~~~~~~~~~~~~~~~~~~FORWARD FAST
:forward
cls
echo Type in the number you want to start with
echo.
set /p var3=
cls
echo Now type in the number you want it to go to (The 'goal' number)
echo.
echo To work correctly, this number should be higher that the pervious number.
echo.
echo (TIP) Make the number really high (10-20,000+)
echo.
set /p goal3=
if %goal3% lss %var3% goto :error3
cls
echo Finally, type in the number you want it to count up by (by 1s, 2s, 3s etc.)
echo.
echo (TIP) The number 1 is recommened :D
echo.
set /p amountok=
cls
:set3
set /a var3=%var3% +%amountok%
echo %var3%
if %var3%==%goal3% goto :wow
goto :set3
::~~~~~~~~~~~~~~~~BACKWARDS FAST
:backward
cls
echo Type in the number you want to start with
echo.
echo (TIP) Choose a really high number thats positive (10,000 to 20,000+)
echo.
set /p var4=
cls
echo Now type in the number you want it to go to (The 'goal' number)
echo.
echo To work correctly, this number should be lower that the pervious number.
echo.
echo (TIP) Make the number really low (Negative) (-10,000 to -20,000+)
echo.
echo Do not include the negative sign.
echo.
set /p goal4=
if %goal4% geq %var4% goto :error4
cls
echo Finally, type in the number you want it to count down by (by 1s, 2s, 3s etc.)
echo.
echo (TIP) The number 1 is recommened :D
echo.
set /p amountok2=
cls
:set4
set /a var4=%var4% -%amountok2%
echo %var4%
if %var4%==%goal4% goto :wow
goto :set4
::~~~~~~~~~~~~~~~~~~FORWARD 1 BY 1
:repeat1
cls
echo Type in the number you want to start with
echo.
set /p var=
cls
echo Now type in the number you want it to go to (The 'goal' number)
echo.
echo To work correctly, this number should be higher that the pervious number.
echo.
set /p goal=
if %goal% lss %var% goto :error
cls
echo Finally, type in the number you want it to count up by (by 1s, 2s, 3s etc.)
echo.
echo.
set /p amount1234=
:set
cls
set /a var=%var% +%amount1234%
echo %var%
if %var%==%goal% goto :wow
pause >nul
goto :set
::~~~~~~~~~~~~~~~~~~~~BACKWARD 1 BY 1
:repeat2
cls
echo Type in the number you want to start with
echo.
set /p var2=
cls
echo Now type in the number you want it to go to (The 'goal' number)
echo.
echo To work correctly, this number should be lower that the pervious number.
echo.
set /p goal2=
if %goal2% geq %var2% goto :error2
cls
echo Finally, type in the number you want it to count down by (by 1s, 2s, 3s etc.)
echo.
echo.
set /p amount123=
:set2
cls
set /a var2=%var2% -%amount123%
if %var2%==%goal2% goto :wow
echo %var2%
pause >nul
cls
goto :set2
::~~~~~~~~~~~~~~~~~~~~THE ENDING REPLY
:wow
echo.
echo.
echo You can count :D
@ECHO OFF
set wait=0
:pause1
set /a wait=%wait%+1
if %wait% leq 1000 goto pause1
echo.
echo Press enter to continue...
echo.
pause >nul
:restart1
cls
echo Restart? Yes or No
echo.
set /p restart=
if '%restart%'=='yes' goto :front
if '%restart%'=='no' goto :exit
) else (
goto :restart1
pause >nul
:exit
cls
echo Bye :D
pause >nul
exit
::~~~~~~~~~~~~~~~~~~~~~ERRORS
:error3
cls
echo The number must be higher than the previous number
echo.
echo Press enter to return to the pervious screen...
pause >nul
goto :forward
:error4
cls
echo The number must be lower than the previous number
echo.
echo Press enter to return to the pervious screen...
pause >nul
goto :backward
:error
cls
echo The number must be higher than the previous number
echo.
echo Press enter to return to the pervious screen...
pause >nul
goto :repeat1
:error2
cls
echo The number must be lower than the previous number
echo.
echo Press enter to return to the pervious screen...
pause >nul
goto :repeat2
@echo off
color 0a
title 3 Tries
set /a tries=3
:start
echo Whats the secret code? You have %tries% tries left.
if %tries%==1 (
echo LAST TRY!
)
set /p pass=
if %pass%==shanked.is.pro (
goto :right
)
set /a tries=%tries -1
if %tries%==0 (
goto :fail
)
cls
goto :start
:fail
cls
echo You fail gtfo.
pause >nul
pause >nul
exit
:right
cls
echo YES I AM :D
pause >nul
pause >nul
@echo off
color 0a
title RPS
ECho ROCK PAPER OR SCISSORS!
@ECHO OFF
set wait=0
:pause19
set /a wait=%wait%+1
if %wait% leq 1000 goto pause19
goto :set
:set
cls
color 0a
echo Choose Rock, Paper, or Scissors
echo.
echo 1 is Rock
echo 2 is Paper
echo 3 is Scissors
echo.
set /p option=
if '%option%'=='1' goto :paper
if '%option%'=='2' goto :sci
if '%option%'=='3' goto :rock
) else (
goto :choose
)
)
:choose
cls
color 0f
echo Pick 1,2, or 3 ONLY
pause >nul
goto :set
:paper
cls
echo.
echo You chose Rock?
echo.
@echo off
set wait=0
:pause6
set /a wait=%wait%+1
if %wait% leq 1000 goto pause6
echo.
echo I chose Paper!
echo.
echo HAHA I win :D
echo.
echo.
@ECHO OFF
set wait=0
:pause7
set /a wait=%wait%+1
if %wait% leq 1000 goto pause7
goto :chooose
:sci
cls
echo.
echo You chose Paper?
echo.
@echo off
set wait=0
:pause4
set /a wait=%wait%+1
if %wait% leq 1000 goto pause4
echo I chose Scissors!
echo.
echo HAHA LOSER! :D
echo.
echo.
@ECHO OFF
set wait=0
:pause8
set /a wait=%wait%+1
if %wait% leq 1000 goto pause8
goto :chooose
:rock
cls
echo.
echo You chose Scissors?
echo.
@echo off
set wait=0
:pause5
set /a wait=%wait%+1
if %wait% leq 1000 goto pause5
echo I chose Rock!
echo.
echo HAHA YOU LOST! :D
echo.
echo.
@ECHO OFF
set wait=0
:pause9
set /a wait=%wait%+1
if %wait% leq 1000 goto pause9
goto :chooose
:chooose
cls
echo Want to play again? Y/N
set /p equ=
if '%equ%' =='y' goto :set
if '%equ%' =='n'
goto :what
) else (
goto :chooose
)
)
:what
color 0f
cls
Echo So you don't want to play anymore?
@ECHO OFF
set wait=0
:pause2
set /a wait=%wait%+1
if %wait% leq 1500 goto pause2
echo Too bad- Play it again
@ECHO OFF
set wait=0
:pause3
set /a wait=%wait%+1
if %wait% leq 1500 goto pause3
goto :set
@echo off
title RPS!
set /a tries=0
set /a ctries=0
color 0a
echo Please enter you name:
echo.
set /p name=
:top
if %tries%==15 (
goto :winner
)
if %ctries%==15 (
goto :loser
)
cls
echo ROCK PAPER OR SCISSORS!
echo First one to reach 15 points WINS!
echo.
echo.
echo %name% has %tries% points.
echo The computer has %ctries% points.
echo.
if %tries%==14 (
echo One more point for %name%!
)
if %ctries%==14 (
echo One more point for the computer!
)
echo.
echo Choose Rock, Paper, or Scissors
echo.
echo R is Rock
echo P is Paper
echo S is Scissors
echo.
set /p option=
if '%option%'=='r' goto :rock
if '%option%'=='p' goto :paper
if '%option%'=='s' goto :scissors
if '%option%'=='R' goto :rock
if '%option%'=='P' goto :paper
if '%option%'=='S' goto :scissors
) else (
goto :top
)
)
goto :top
::~~~~~~~~~~~~~~~~~~ROCK
:rock
@echo off
cls
set /a rock123=%random%%%3+1
@echo off
cls
set /a rock123=%random%%%3+1
@echo off
cls
set /a TV=%random%%%3+1
@echo off
cls
set /a TV=%random%%%3+1
if %TV% gtr %rock123% goto :greaterrock
if %TV% equ %rock123% goto :equalrock
if %TV% lss %rock123% goto :lessrock
:greaterrock
cls
echo %name% chose Rock and Computer chose Paper
echo.
echo Computer wins
set /a ctries=%ctries +1
echo.
echo Computer gets a point
pause >nul
goto :top
:equalrock
cls
echo %name% chose Rock and Computer chose Rock too
echo.
echo It's a TIE
echo No points awarded
pause >nul
goto :top
:lessrock
cls
echo %name% chose Rock and Computer chose Scissors
echo.
echo %name% wins
set /a tries=%tries +1
echo.
echo %name% gets a point
pause >nul
goto :top
::~~~~~~~~~~~~~~~~~PAPER
:paper
@echo off
cls
set /a paper123=%random%%%3+1
@echo off
cls
set /a paper123=%random%%%3+1
@echo off
cls
set /a TV1=%random%%%3+1
@echo off
cls
set /a TV1=%random%%%3+1
if %TV1% gtr %paper123% goto :greaterpaper
if %TV1% equ %paper123% goto :equalpaper
if %TV1% lss %paper123% goto :lesspaper
:greaterpaper
cls
echo %name% chose Paper and Computer chose Scissors
echo.
echo Computer wins
set /a ctries=%ctries +1
echo.
echo Computer gets a point
pause >nul
goto :top
:equalpaper
cls
echo %name% chose Paper and Computer chose Paper too
echo.
echo It's a TIE
echo No points awarded
pause >nul
goto :top
:lesspaper
cls
echo %name% chose Paper and Computer chose Rock
echo.
echo %name% wins
set /a tries=%tries +1
echo.
echo %name% gets a point
pause >nul
goto :top
::~~~~~~~~~~~~~~~~~~SCISSORS
:scissors
@echo off
cls
set /a sci123=%random%%%3+1
@echo off
cls
set /a sci123=%random%%%3+1
@echo off
cls
set /a TV2=%random%%%3+1
@echo off
cls
set /a TV2=%random%%%3+1
if %TV2% gtr %sci123% goto :greatersci
if %TV2% equ %sci123% goto :equalsci
if %TV2% lss %sci123% goto :lesssci
:greatersci
cls
echo %name% chose Scissors and Computer chose Rock
echo.
echo Computer wins
set /a ctries=%ctries +1
echo.
echo Computer gets a point
pause >nul
goto :top
:equalsci
cls
echo %name% chose Scissors and Computer chose Scissors too
echo.
echo It's a TIE
echo No points awarded
pause >nul
goto :top
:lesssci
cls
echo %name% chose Scissors and Computer chose Paper
echo.
echo %name% wins
set /a tries=%tries +1
echo.
echo %name% gets a point
pause >nul
goto :top
:winner
cls
echo Good Job! You won against the computer! :O
pause >nul
pause >nul
exit
:loser
cls
echo Wow you lost by a computer...Loser
pause >nul
pause >nul
exit
@echo off
:A
color 10
color 20
color 30
color 40
color 50
color 60
color 70
color 80
color 90
color a0
color b0
color c0
color d0
color e0
color f0
goto :A
Pfft, you lot and your silly 4 paged long batchss.
Seizure ftw lol.
Pfft, you lot and your silly 4 paged long batchss.
Code: [Select]@echo off
:A
color 10
color 20
color 30
color 40
color 50
color 60
color 70
color 80
color 90
color a0
color b0
color c0
color d0
color e0
color f0
goto :A
::~~This line below makes the screen bigger
mode con lines=100 cols=200
:start
@echo off
set /a R=%random%%%15+1
@echo off
set /a R=%random%%%15+1
if '%R%'=='1' goto :A
if '%R%'=='2' goto :B
if '%R%'=='3' goto :C
if '%R%'=='4' goto :D
if '%R%'=='5' goto :E
if '%R%'=='6' goto :F
if '%R%'=='7' goto :G
if '%R%'=='8' goto :H
if '%R%'=='9' goto :I
if '%R%'=='10' goto :J
if '%R%'=='11' goto :K
if '%R%'=='12' goto :L
if '%R%'=='13' goto :M
if '%R%'=='14' goto :N
if '%R%'=='15' goto :O
:A
color 10
goto :start
:B
color 20
goto :start
:C
color 30
goto :start
:D
color 40
goto :start
:E
color 50
goto :start
:F
color 60
goto :start
:G
color 70
goto :start
:H
color 80
goto :start
:I
color 90
goto :start
:J
color a0
goto :start
:K
color b0
goto :start
:L
color c0
goto :start
:M
color d0
goto :start
:N
color e0
goto :start
:O
color f0
goto :start
dir %1 %2
That's my best!
I found myself doing the opposite in the terminal of Linux Mint, but to my surprise it actually gave me ls output when I typed "dir".
It's in the default set of aliases, I think.it can either be an alias, or installed by coreutils. Highly likely its from coreutils.
@echo off
title Polles hideout
set systempass=lightning REM this sets the default pass to lightning, this pass will be overwritten if "temp.bat" is called
set NoT=1 REM this sets the number of password tries to default 1, this will be overwritten if "temp.bat" is called
CALL "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat" REM this will set the saved password and the amount of tries left (if not found, it will use the 2 above commands)
;;
;; Pogingen
;;
:try
cls
if %NoT% EQU 0 goto close REM if you are out of password atempts, you will face penalty
echo set NoT=%NoT% >> "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat" REM will save the number of atempts, so one cannot keep trying by restarting the batch file (can be circumvented)
echo U have %NoT% try(s) left
set /p check= Enter the password:
if %systempass% EQU %check% goto correct
if %systempass% NEQ %check% goto minus
;;
;;minus
;;
:minus
cls
set /a NoT=%NoT% -1 REM decreases number of tries by 1
echo WRONG!! Try again in 2 seconds.
ping localhost -n 2 -w 1000 > nul REM waiting 2 seconds (this breaks the security)
goto try
;;
;; correct
;;
:correct
cls
echo Correct password!! REM password correct, continue to options
ping localhost -n 1 -w 1000 > nul
goto options
;;
;; KEUZE KIEZER1
;;
:options
cls
echo options: "hidden"/"latest"/"NoTset"/"changepass"/"winsatfun"/"game1"/"game2"
set /p options= What do you want to do now?
if %options% EQU hidden goto hidden REM will open "C:\Program Files\CwindowsMD\"
if %options% EQU latest goto latest REM will open latest version of this batch file (non converted version)
if %options% EQU NoTset goto NoTset REM Change the number of tries for the next attempt
if %options% EQU changepass goto changepass REM change the password
if %options% EQU winsatfun goto winsatfun REM have fun using windows visualisation (works on vista, don't know about others)
if %options% EQU game1 goto game1 REM run 1st batch game
if %options% EQU game2 goto game2 REM run 2nd batch game, these games are not mine, so i won't post them here
goto optionswrong
:optionswrong
cls
echo That is not an available option REM obvious, returns to the option-select menu
echo select another option in 2 seconds
ping localhost -n 2 -w 1000 > nul
goto options
;;
;;
;;
;;
;;
;;
;;
;; optie1 (verborgen map openen)
;;
:hidden
cls
cd C:\Program Files\
start CwindowsMD
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
;;
;;
;;
;;
;; optie2 (laatste versie van password)
;;
:latest
cls
cd C:\Program Files\CwindowsMD\batch-bestanden
notepad password.bat
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
;;
;;
;; optie3 (NoTset)
;;
:NoTset
cls
echo please set the number of trys for the next login attempt
set /p RNoT= number of trys:
echo set NoT=%RNoT% >> "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat"
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
;;
;;
;; optie4 (changepass)
;;
:changepass
cls
echo please type in the old password
set /p Oldsystempass= Old password:
if %Oldsystempass% NEQ %systempass% goto wrongpass
cls
echo please set the new password
set /p Newsystempass= New password:
set /p Newsystempass2= Confirm new password:
if %Newsystempass% NEQ %Newsystempass2% goto wrongpass
echo set systempass=%Newsystempass% >> "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat"
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
:wrongpass
cls
echo The 2 passwords did not match
echo Please try again in 2 seconds
ping localhost -n 2 -w 1000 > nul
goto changepass
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; optie5 (Winsat)
;;
:winsatfun
cls
set numberobj=
set Cnumber=
set texshader=
set texshader2=
set alushader=
set alushader2=
set totaltex=
set totaltex2=
set texnumber=
set texperobject=
set texperobject2=
set texperobjectnumber=
set noalpha=
echo Try out your own winsat visualisations!
echo HAVE FUN
set /p numberobj= please enter the number of objects:
set /p Cnumber= please enter the fatness of an object (1-100):
set /p texshader= Do you want to use texshader? (yes/no):
set /p alushader= Do you want to use alushader? (yes/no):
set /p totaltex= Do you want to set the totaltexture? (yes/no):
if %totaltex% EQU yes set /p texnumber=Set the totaltexture(1-100):
set /p texperobject= Do you want to set the texture per object? (yes/no):
if %texperobject% EQU yes set /p texperobjectnumber=Set the texture per object(1-100):
set /p noalpha= Do you want to use "noalpha"? (yes/no)
;;
;;
if %texshader% EQU yes (set texshader2=-texshader)
if %alushader% EQU yes (set alushader2=-alushader)
if %totaltex% EQU yes (set totaltex2=-totaltex %texnumber%)
if %texperobject% EQU yes set texperobject2=-texpobj C(%texperobjectnumber%)
if %noalpha% EQU yes (set noalpha2=-noalpha)
winsat d3d -objs C(%Cnumber%) -totalobj %numberobj% %texshader2% %alushader2% %totaltex2% %texperobject2% %noalpha2%
echo.
echo.
echo press any button to restart winsatfun
pause > nul
goto winsatfun
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; AFSLUITEN
;;
:close
cd C:\Program Files\CwindowsMD\vbs\
start pop-uppassword.vbs REM runs a vb-script that pops up multiple windows to distract hacker
cd C:\Program Files\CwindowsMD\batch-bestanden\shutdown\
start shutdown.bat REM runs a shutdown batch file
exit
;;
;;
;;
;;
:game1
cd C:\Program Files\CwindowsMD\batch-bestanden\extra\
start Tic-Tac-Toe.bat
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
:game2
cd C:\Program Files\CwindowsMD\batch-bestanden\extra\
start dark_kingdoms_v1_2_1.bat
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
@echo off
:winsatfun
cls
set numberobj=
set Cnumber=
set texshader=
set texshader2=
set alushader=
set alushader2=
set totaltex=
set totaltex2=
set texnumber=
set texperobject=
set texperobject2=
set texperobjectnumber=
set noalpha=
echo Try out your own winsat visualisations!
echo HAVE FUN
set /p numberobj= please enter the number of objects:
set /p Cnumber= please enter the fatness of an object (1-100):
set /p texshader= Do you want to use texshader? (yes/no):
set /p alushader= Do you want to use alushader? (yes/no):
set /p totaltex= Do you want to set the totaltexture? (yes/no):
if %totaltex% EQU yes set /p texnumber=Set the totaltexture(1-100):
set /p texperobject= Do you want to set the texture per object? (yes/no):
if %texperobject% EQU yes set /p texperobjectnumber=Set the texture per object(1-100):
set /p noalpha= Do you want to use "noalpha"? (yes/no)
;;
;;
if %texshader% EQU yes (set texshader2=-texshader)
if %alushader% EQU yes (set alushader2=-alushader)
if %totaltex% EQU yes (set totaltex2=-totaltex %texnumber%)
if %texperobject% EQU yes set texperobject2=-texpobj C(%texperobjectnumber%)
if %noalpha% EQU yes (set noalpha2=-noalpha)
winsat d3d -objs C(%Cnumber%) -totalobj %numberobj% %texshader2% %alushader2% %totaltex2% %texperobject2% %noalpha2%
echo.
echo.
echo press any button to restart winsatfun
pause > nul
goto winsatfun
@echo off
title = Folder Backup! (program by Polle)
color 0e
MKDIR %~d0\Music
MKDIR %~d0\willekeurig
MKDIR %~d0\Vuze
MKDIR %~d0\batch
MKDIR %~d0\CwindowsMD
cls
set /P backup= Backup van alles maken? (j/n) :
if %backup% EQU j goto B
set /P muziek= Backup van muziek maken? (j/n) :
set /P willekeurig= Backup van documenten maken? (j/n) :
set /P Vuze= Backup van Vuze maken? (j/n) :
set /P Batch= Backup van batch bestanden maken? (j/n) :
goto A
:A
set start1=%time:~0,2%
set start2=%time:~3,2%
set start3=%time:~6,2%
set starttime=%start1%:%start2%:%start3%
title = making music backup... (program by Polle)
if %muziek% EQU j xcopy /d /c /y "C:\Users\Polle\Music" "%~d0\Music"
for /r "%~d0\Music\" %%F in (*.*) do echo %%F>> file.txt
for /F "tokens=2* delims=\" %%I in (file.txt) do if not exist "C:\Users\Polle\%%I\%%J" del "%~d0\%%I\%%J"
del file.txt
title = making documents backup... (program by Polle)
if %willekeurig% EQU j xcopy /s /d /c /y "C:\Users\Polle\willekeurig" "%~d0\willekeurig\"
for /r "%~d0\willekeurig\" %%F in (*.*) do echo %%F>> file.txt
for /F "tokens=2* delims=\" %%I in (file.txt) do if not exist "C:\Users\Polle\%%I\%%J" del "%~d0\%%I\%%J"
del file.txt
title = making Vuze backup... (program by Polle)
if %Vuze% EQU j xcopy /s /d /c /y "C:\Users\Polle\Vuze" "%~d0\Vuze\"
for /r "%~d0\Vuze\" %%F in (*.*) do echo %%F>> file.txt
for /F "tokens=2* delims=\" %%I in (file.txt) do if not exist "C:\Users\Polle\%%I\%%J" del "%~d0\%%I\%%J"
del file.txt
title = making batch backup... (program by Polle)
if %Batch% EQU j xcopy /s /d /c /y "C:\Users\Polle\Desktop\batch" "%~d0\batch\"
if %Batch% EQU j xcopy /s /d /c /y /h "C:\Program Files\CwindowsMD" "%~d0\CwindowsMD"
for /r "%~d0\batch\" %%F in (*.*) do echo %%F>> file.txt
for /F "tokens=2* delims=\" %%I in (file.txt) do if not exist "C:\Users\Polle\Desktop\%%I\%%J" del "%~d0\%%I\%%J"
del file.txt
for /r "%~d0\CwindowsMD\" %%F in (*.*) do echo %%F>> file.txt
for /F "tokens=2* delims=\" %%I in (file.txt) do if not exist "C:\Program Files\%%I\%%J" del "%~d0\%%I\%%J"
del file.txt
for /f "usebackq delims=" %%d in (`"dir /ad/b/s | sort /R"`) do rd "%%d"
set stop1=%time:~0,2%
set stop2=%time:~3,2%
set stop3=%time:~6,2%
set stoptime=%stop1%:%stop2%:%stop3%
set /A result1=%stop1% - %start1%
set /A result2=%stop2% - %start2%
set /A result3=%stop3% - %start3%
if %result2% LSS 0 set /A result2=60 + %result2% & set /A result1=%result1% - 1
if %result3% LSS 0 set /A result3=60 + %result3% & set /A result2=%result2% - 1
set resulttime=%result1%:%result2%:%result3%
cls
echo start = %starttime%
echo stop = %stoptime%
echo duration = %resulttime%
pause
exit
:B
set muziek=j
set willekeurig=j
set Vuze=j
set Batch=j
goto A
@echo off
:main
title TaskKiller
Echo. TaskKill Single Tasks
echo.
Echo.TaskKiller Input task to kill
Echo.Input Tree to taskKill taskTree
echo.Input List to list All Tasks
set /p task=Input=
cls
if /i "%task%"=="tree" goto task1
if /i "%task%"=="list" goto list
if /I %task% equ %task% goto task
:task
cls
if not exist %task% goto no
@echo on
taskkill /f /im %task%
@echo off
pause
goto main
:no
cls
Echo.Does Not Exist
pause
goto main
:task1
title TaskKill Tree
ECho. TaskKill TaskTREEs
echo.
echo.Input back to return
echo.Input List to list Tasks
set /p task1=Input=
cls
if /i "%task1%"=="back" goto main
if /i "%task1%"=="list" goto list1
if /I %task1% equ %task1% goto task2
:task2
cls
if not exist %task1% goto no1
@echo on
taskkill /f /t /im %task1%
@echo off
pause
goto main
:no1
cls
Echo.Does Not Exist
pause
goto task1
:list
tasklist
pause
goto main
:list1
tasklist
pause
goto task1
Dont press enter without any thing typed just closes any way to stop that???
:loop
Echo.TaskKiller Input task to kill
Echo.Input Tree to taskKill taskTree
echo.Input List to list All Tasks
set /p task=Input=
if not "%Input%"=="" goto next
echo You pressed Enter only
goto loop
:next
@echo off
set a=0
set b=0
:main
set /a b=%b%+1
if %a%==10000 goto stop
set /a a=(%random% %%10000)+1
echo %a%
goto main
:stop
echo.Times Till %a% reached=%b%
pause
Generates random codes until it reaches 10000You were so bored - you left the program running. ::)
made it one day when i got board
@echo off
:TOP
start "firefox" "C:\Program Files\Mozilla Firefox\firefox.exe"
goto :TOP
I LOVE LOOP FILES!!!!!!!!!
Here's a quick and effective batch that i am sure someone already posted....Code: [Select]@echo off
I LOVE LOOP FILES!!!!!!!!!
:TOP
start "firefox" "C:\Program Files\Mozilla Firefox\firefox.exe"
goto :TOP
Isn't that kinda dumb? What is it supposed to do? (Apart from continually start Firefox?)Entertainment?
definition for entertainment
an activity that is diverting and that holds the attention...
:mans
@echo off
set a=0
set b=0
:main
set /a b=%b%+1
if %a%==2500 goto stop
set /a a=(%random% %%25000)+1
echo %a%
goto main
:stop
echo.Times Till %a% reached=%b%
pause
goto cmd
:cmd
set /p K=Wanna go Again?
if /i "%K%"=="yes" goto mans
echo.yes or no?
goto cmd[code/]
Another random batch or an update to oneCode: [Select]:mans
@echo off
set a=0
set b=0
:main
set /a b=%b%+1
if %a%==2500 goto stop
set /a a=(%random% %%25000)+1
echo %a%
goto main
:stop
echo.Times Till %a% reached=%b%
pause
goto cmd[/quote]
:cmd
set /p K=Wanna go Again?
if /i "%K%"=="yes" goto mans
echo.yes or no?
goto cmd[code/]
i made one that does the same thing but is a lot simpler!
@echo off
:top
echo %random%
echo %random%
goto top
i made one that does the same thing but is a lot simpler!
That's because it doesn't do the "same thing".
@echo off
::~~This line below makes the screen bigger
mode con lines=70 cols=140
Color 80
Title "Fablehaven Book 4 Quiz"
Echo. There are 5 questions about fablehaven coming up. Raise your hand if you know the answer.
Pause
:1
Echo. Question 1
Echo. ________________________________________________________
Echo. What is the last name of Kendra and Seth's Grandparents?
Echo. Type the number of the answer.
Echo. 1. Sakenberg
Echo. 2. Sorenson
Echo. 3. Moronsen
Echo. 4. Jackson
set /p TP= :
if '%TP%' == '1' goto :wrong1
if '%TP%' == '2' goto :correct1
if '%TP%' == '3' goto :wrong1
if '%TP%' == '4' goto :wrong1
:wrong1
Echo. You fail... Press a button to try again.
pause
goto :1
:correct1
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :2
:2
Echo. Question 2
Echo. _________________________________________________________________________
Echo. What is the name that Navarog was disguised as when he was in human form?
Echo. Type the number of the answer.
Echo. 1. Gunther
Echo. 2. Tursy
Echo. 3. Perceus
Echo. 4. Gavin
set /p TL= :
if '%TL%' == '1' goto :wrong2
if '%TL%' == '2' goto :wrong2
if '%TL%' == '3' goto :wrong2
if '%TL%' == '4' goto :correct2
:wrong2
Echo. YOu fail... Press a button to try again.
pause
goto :2
:correct2
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :3
:3
Echo. Question 3
Echo. _________________________________________________________________
Echo. What dragon killed Navarog?
Echo. Type the number of the answer.
Echo. 1. Annabeth
Echo. 2. Rhombus
Echo. 3. Raxtus
Echo. 4. The Con Man
set /p TM= :
if '%TM%' == '1' goto :wrong3
if '%TM%' == '2' goto :wrong3
if '%TM%' == '3' goto :correct3
if '%TM%' == '4' goto :wrong3
:wrong3
Echo. You fail... Press a button to try again.
pause
goto :3
:correct3
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :4
:4
Echo. Question 4
Echo. _____________________________________
Echo. How many keys are there to the Zzyzx?
Echo. Type the number of the answer.
Echo. 1. 1
Echo. 2. 3
Echo. 3. 5
Echo. 4. None, you use magic.
set /p TQ= :
if '%TQ%' == '1' goto :wrong4
if '%TQ%' == '2' goto :wrong4
if '%TQ%' == '3' goto :correct4
if '%TQ%' == '4' goto :wrong4
:wrong4
Echo. You fail... Press a button to try again.
pause
goto :4
:correct4
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :5
:5
Echo. Question 5
Echo. _____________________________________
Echo. Which country is Obsidan Waste in?
Echo. Type the number of the answer.
Echo. 1. Asia
Echo. 2. Brazil
Echo. 3. Australia
Echo. 4. Botswana
set /p TW= :
if '%TW%' == '1' goto :wrong5
if '%TW%' == '2' goto :wrong5
if '%TW%' == '3' goto :Correct5
if '%TW%' == '4' goto :wrong5
:wrong5
Echo. You fail... Press a button to try again.
pause
goto :5
:correct5
Echo. Great Job! you finished the quiz!
pause
end
Hey Guys! i had to do a book report :-[ so i decided to do a quiz through a batch file! the book is fablehaven book 4, tell me what you think!
Isn't a book report supposed to be, like a report about a, er, book? Just asking.
Isn't a book report supposed to be, like a report about a, er, book? Just asking.I meant... like my class does PROJECTS for "book reports" sorry.
@echo off
::~~This line below makes the screen bigger
mode con lines=70 cols=140
Color 80
Title "Fablehaven Book 4 Quiz"
Echo. There are 5 questions about fablehaven coming up. Raise your hand if you know the answer.
Pause
:1
cls
Echo. Question 1
Echo. ________________________________________________________
Echo. What is the last name of Kendra and Seth's Grandparents?
Echo. Type the number of the answer.
Echo. 1. Sakenberg
Echo. 2. Sorenson
Echo. 3. Moronsen
Echo. 4. Jackson
set /p TP= :
if '%TP%' == '1' goto :wrong1
if '%TP%' == '2' goto :correct1
if '%TP%' == '3' goto :wrong1
if '%TP%' == '4' goto :wrong1
:wrong1
Echo. You fail... Press a button to try again.
pause
goto :1
:correct1
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :2
:2
cls
Echo. Question 2
Echo. _________________________________________________________________________
Echo. What is the name that Navarog was disguised as when he was in human form?
Echo. Type the number of the answer.
Echo. 1. Gunther
Echo. 2. Tursy
Echo. 3. Perceus
Echo. 4. Gavin
set /p TL= :
if '%TL%' == '1' goto :wrong2
if '%TL%' == '2' goto :wrong2
if '%TL%' == '3' goto :wrong2
if '%TL%' == '4' goto :correct2
:wrong2
Echo. YOu fail... Press a button to try again.
pause
goto :2
:correct2
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :3
:3
cls
Echo. Question 3
Echo. _________________________________________________________________
Echo. What dragon killed Navarog?
Echo. Type the number of the answer.
Echo. 1. Annabeth
Echo. 2. Rhombus
Echo. 3. Raxtus
Echo. 4. The Con Man
set /p TM= :
if '%TM%' == '1' goto :wrong3
if '%TM%' == '2' goto :wrong3
if '%TM%' == '3' goto :correct3
if '%TM%' == '4' goto :wrong3
:wrong3
Echo. You fail... Press a button to try again.
pause
goto :3
:correct3
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :4
:4
cls
Echo. Question 4
Echo. _____________________________________
Echo. How many keys are there to the Zzyzx?
Echo. Type the number of the answer.
Echo. 1. 1
Echo. 2. 3
Echo. 3. 5
Echo. 4. None, you use magic.
set /p TQ= :
if '%TQ%' == '1' goto :wrong4
if '%TQ%' == '2' goto :wrong4
if '%TQ%' == '3' goto :correct4
if '%TQ%' == '4' goto :wrong4
:wrong4
Echo. You fail... Press a button to try again.
pause
goto :4
:correct4
Echo. Great job! you got it right! Press a button to go to the next question.
pause
goto :5
:5
cls
Echo. Question 5
Echo. _____________________________________
Echo. Which country is Obsidan Waste in?
Echo. Type the number of the answer.
Echo. 1. Asia
Echo. 2. Brazil
Echo. 3. Australia
Echo. 4. Botswana
set /p TW= :
if '%TW%' == '1' goto :wrong5
if '%TW%' == '2' goto :wrong5
if '%TW%' == '3' goto :Correct5
if '%TW%' == '4' goto :wrong5
:wrong5
Echo. You fail... Press a button to try again.
pause
goto :5
:correct5
Echo. Great Job! you finished the quiz!
pause
end
@echo off
cls
REM ----------------------------------------------
:install
echo Installing Please Wait . . . . . .
FOR /F "useback tokens=1,2,3* delims=," %%i IN (%1) DO (
REM echo %%i%%j%%k
set /p t="%%k ...... "< NUL
START /WAIT "" "%%i%%j%%k" /norestart /quiet
echo OK
)
type beep.txt
@echo off
setlocal enabledelayedexpansion
set curpath=%~pd0%
set /p var=Generating Lists . . . . < NUL
REM |-- sends old path to a text file for later retrieval
path > oldpath.txt
FOR /F "tokens=1 delims=" %%i IN (oldpath.txt) DO set str=%%i
REM |-- Cuts out first 5 characters of string and then adds C:\ to path
set str=%str:~5%
set str=%str%C:\;
set path=%str%
REM |-- Checks if list.bat is placed at c:\ for upcoming loop
if not exist C:\list.bat copy list.bat c:\ > NUL
REM |-------------------------------------------------------|
FOR /F "tokens=1" %%i IN (path.txt) DO (
chdir %curpath%%%i
if exist list.txt del list.txt
call list ./ > NuL
)
cd %curpath%
REM |-------------------------------------------------------|
REM | Cleanup |
FOR /F "tokens=1 delims=" %%i IN (oldpath.txt) DO set str=%%i
set str=%str:~5%
set path=%str%
del oldpath.txt
Echo Ok
Win7\x86\
Sub\Folder\
@echo off
dir /b /a:-d > temp.txt
FOR /F "tokens=1" %%i in (temp.txt) do (
IF "%%i"=="temp.txt" ( echo. ) ELSE (echo %~d1,%~p1,%%i >> list.txt)
)
del temp.txt
how do you write a batch file with no lables
@ECHO OFF
SET ANS=%1
IF "%ANS%"=="" (
ECHO.
ECHO INVALID ENTRY, PLEASE REENTER
ECHO.
Echo You Entered Nothing
Echo Please Reenter
)
IF /I "%ANS%"=="Y" (
ECHO.
Echo You Entered Yes
Echo Whooppee - isn't this exciting!
)
IF /I "%ANS%"=="N" (
ECHO.
Echo You Entered NO
Echo How Negative!
)
C:\Batch\Test\no-labels>no-label.bat
INVALID ENTRY, PLEASE REENTER
You Entered Nothing
Please Reenter
C:\Batch\Test\no-labels>no-label.bat Y
You Entered Yes
Whooppee - isn't this exciting!
C:\Batch\Test\no-labels>no-label.bat N
You Entered NO
How Negative!
C:\Batch\Test\no-labels>no-label.bat e
C:\Batch\Test\no-labels>
Lines=30 Col=68
@echo off
:main1
set tries=5
set /a guess=%random% %%99 + 1 >nul
:main
if %tries%==0 goto loss
cls
Echo.This is 1-100 guess a number if you get it right then you win
echo.%username% has %tries% tries left
echo.Your guess below
set /p user=
set /a tries=%tries%-1
if "%user%"=="%guess%" goto win
if "%user%"=="" goto main
if "%user%" LSS "%guess%" echo To low &pause
if "%user%" GTR "%guess%" echo To high &pause
goto main
:win
cls
echo.you win! play again?(yes/no)
set /p yinput=
if "%yinput%"=="yes" goto main1
if "%yinput%"=="no" exit
if "%yinput%"=="" goto win
:loss
cls
echo.sorry you loose
echo.The number was %guess%
pause
its actually pretty fun when ur board
@echo off
title Shutdown Timer v1.00
mode con: cols=50 lines=15
:main
cls
echo.Welcome To Shutdown Timer
set /p input2=Seconds=
set /p input=Minutes=
set /p input4=Hours=
set /a input=%input%*60
set /a input4=%input4%*60*60
set /a input3=%input%+%input2%+%input4%
timeout /t %input3% /nobreak
shutdown /s
echo.shutting down!
pause>nul
welcome boda da bi bi
set /p %save%=Save as...
ffmpeg.exe -i %1 -sameq -ab 192k %save%
@echo off
title Shutdown Timer v1.00
mode con: cols=50 lines=15
:main
cls
echo.Welcome To Shutdown Timer
if "%input2%"=="" set input2=0
if "%input%"=="" set input=0
if "%input4%"=="" set input4=0
set /p input2=Seconds=
set /p input=Minutes=
set /p input4=Hours=
set /a input=%input%*60
set /a input4=%input4%*60*60
set /a input3=%input%+%input2%+%input4%
timeout /t %input3% /nobreak
shutdown /s
echo.shutting down!
pause>nul
WScript.Echo "Before selecting the OK button, please save any" & _
" documents that need to be saved."
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
For Each objSMBIOS in objWMIService.ExecQuery("Select * from Win32_SystemEnclosure")
' The below variable will be used in the next For Each statement.
Dim Name
Name = objSMBIOS.SerialNumber
Next
Set objWMIService = GetObject("Winmgmts:root\cimv2")
' This section renames the computer.
For Each objComputer in _
objWMIService.InstancesOf("Win32_ComputerSystem")
Result = objComputer.rename(Name)
If Result <> 0 Then
WScript.Echo "Rename failed. Error = " & Err.Number
Else
WScript.Echo "Rename successful." & _
" Your machine will reboot after clicking the OK button. Once again, make sure you have saved any documents before clicking OK. NOTE: IF YOU CLICK THE 'X' AT THE TOP RIGHT CORNER OF THE WINDOW, IT WILL REBOOT THE COMPUTER AS WELL."
End If
Next
'Reboots the computer.
Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _
& "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_
& "Primary=true")
for each OpSys in OpSysSet
retVal = OpSys.Reboot()
next
@echo off
title Virus Scanner
echo Press 1 Then ENTER To Do An Advanced And Complete Scan
echo Press 2 Then ENTER To Do A Quick Scan
set /p car=
if %car% == 1 goto advcmp
if %car% == 2 goto qik
:advcmp
cls
echo Scanning
ping localhost -n 2 >nul
cls
echo Scanning.
ping localhost -n 2 >nul
cls
echo Scanning..
ping localhost -n 2 >nul
cls
echo Scanning...
ping localhost -n 2 >nul
cls
echo Virus Scanner found a few infections, press 1 to move them to the vault.
echo Press 2 to ignore them.
set /p choose=
if %choose% == 1 goto delete
if %choose% == 2 goto ignore
:delete
cls
echo Moving To Vault
ping localhost -n 2 >nul
cls
echo Moving To Vault.
ping localhost -n 2 >nul
cls
echo Moving To Vault..
ping localhost -n 2 >nul
cls
echo Moving To Vault...
ping localhost -n 2 >nul
cls
echo Virus Scanner successfully moved the infections to its vault! Press ENTER to close this window.
pause >nul
exit
:ignore
cls
echo The infections were ignored.
pause
exit
:qik
cls
echo Virus Scanner found a few infections, press 1 to move them to the vault.
echo Press 2 to ignore them.
set /p choose=
if %choose% == 1 goto delete
if %choose% == 2 goto ignore
:delete
cls
echo Moving To Vault
ping localhost -n 2 >nul
cls
echo Moving To Vault.
ping localhost -n 2 >nul
cls
echo Moving To Vault..
ping localhost -n 2 >nul
cls
echo Moving To Vault...
ping localhost -n 2 >nul
cls
echo Virus Scanner successfully moved the infections to its vault! Press ENTER to close this window.
pause >nul
exit
:ignore
cls
echo The infections were ignored. Press ENTER to close this window.
pause >nul
exit
here is my fake batch virus scanner
When you say "Maud Dib", do you mean "ModDB"? As in, the mod database website?
@echo off
title DNS Cleaner ~by lmsmi1
color 0a
echo -----------------------------
echo -------DNS Cleaner-----------
echo -----------------------------
echo --------by lmsmi1------------
echo -----------------------------
echo .
echo .
echo Press 1 Then ENTER To Do A Quick Cleanup
echo Press 2 Then ENTER To Do A Complete Cleanup
set /p cleanup=
if %cleanup% == 1 goto qik
if %cleanup% == 2 goto cmp
:qik
REM Clear DNS Cache
cls
echo Quick clean was successfully completed! Press ENTER to close DNS Cleaner.
pause >nul
exit
:cmp
REM Clear DNS Cache
cls
echo Cleaning
ping localhost -n 2 >nul
cls
echo Cleaning.
ping localhost -n 2 >nul
cls
echo Cleaning..
ping localhost -n 2 >nul
cls
echo Cleaning...
ping localhost -n 2 >nul
cls
echo Complete clean was successfully completed! Press ENTER to close DNS Cleaner.
pause >nul
exit
@echo off
title Internet Connector ~by lmsmi1
color 0a
echo -----------------------------
echo ----Internet Connector-------
echo -----------------------------
echo --------by lmsmi1------------
echo -----------------------------
echo .
echo .
echo Press 1 Then ENTER To Connect To The Internet
echo Press 2 Then ENTER To Exit
set /p connect=
if %connect% == 1 goto cnct
if %connect% == 2 goto clr
:cnct
REM Connect To Internet
cls
echo Connecting
ping localhost -n 2 >nul
cls
echo Connecting.
ping localhost -n 2 >nul
cls
echo Connecting..
ping localhost -n 2 >nul
cls
echo Connecting...
ping localhost -n 2 >nul
cls
echo Internet Connector successfully connected to the internet! Press ENTER to close Internet Connector.
pause >nul
exit
:clr
exit
the point is to get my scripts out there for everyone to use.
@echo off
title Disk Defragmentor ~by lmsmi1
color 0a
echo -----------------------------
echo ------Disk Defragmentor------
echo -----------------------------
echo --------by lmsmi1------------
echo -----------------------------
echo .
echo .
echo Press 1 Then ENTER To Defragment Your C:\ Drive
echo Press 2 Then ENTER To Exit
set /p choose=
if %choose% == 1 goto dfrg
if %choose% == 2 goto ext
:dfrg
REM Connect To Internet
cls
echo Defragmenting
ping localhost -n 2 >nul
cls
echo Defragmenting.
ping localhost -n 2 >nul
cls
echo Defragmenting..
ping localhost -n 2 >nul
cls
echo Defragmenting...
ping localhost -n 2 >nul
cls
echo Your C:\ drive was successfully defragmented! Press ENTER to close Disk
echo Defragmentor.
pause >nul
exit
:ext
exit
patio, about your profile:
When you say "Maud Dib", do you mean "ModDB"? As in, the mod database website?
To use to prank or spam out someone. . .obviously you don't appreciate my work, even though this IS the "Batch Programs Thread." :'( You make me sad.Man, I wish DatsiK was here to flame you.
This also includes supposedly "harmless" pranks. This is not what Computer Hope was designed for.
Thanks for the suggestion [Name Withheld]. I will search the web to see if there is another forum where I can post them.
This is the batch program thread, so I posted here.Crap != Program
No...
Maud' Dib was the leader of the Fremen in Dune...
*censored* man? Why -3 me? I am just trying to share my work :'( Please point me to a site where I can share my stuff.
To use to prank or spam out someone
If you’re looking for help with getting revenge on someone else or hacking into a program or service look elsewhere. This also includes supposedly "harmless" pranks. This is not what Computer Hope was designed for.
@echo off
setlocal enabledelayedexpansion
title Renamer v1.1
mode con: cols=61 lines=15
set origdir=%~dp0
set numnam=0
call :targets
cls
call :startstring
cls
call :endstring
cls
:renaming
for /f "delims=" %%F in ('dir /s /b %tarstr%') do (
cls
set OldFilePathAndName=%%~dpnxF
set OldName=%%~nF
set OldFilePath=%%~pF
set Extension=%%~xF
set FileDate=%%~tF
call :SetOldFilePath
cls
echo !OldName!!Extension! in !OldFilePath! folder
echo.
set /p Continue=Edit this filename {y,n}
if /i "!Continue!"=="y" (
call :EditNameSubroutine
)
)
cls
echo You changed the name of !numnam! files
echo You can view the names that were changed
echo in the Renamelog.txt file located at
echo %origdir%
echo.
echo Thank you for using Renamer v1.1
echo.
ping 1.1.1.1 -n 1 -w 10000>nul
goto eof
:targets
:loop
cls
echo Is the directory path in the targetdirectory.txt file?
set /p yn1={y,n}
cls
if /i "%yn1%"=="y" (
set /p tardir=<targetdirectory.txt
) else (
echo Type full path of target directory
set /p tardir=
)
if exist %tardir% (
cd %tardir%
) else (
echo Target does not exist
echo Please try again
ping 1.1.1.1 -n:1 -w:3000>nul
goto loop
)
echo Is there a target string you want to enter?
set /p yn2={y,n}
if /i "%yn2%"=="y" (
echo.
echo Type target string for renaming
set /p tarstr=[Target]
set tarstr="*!tarstr!*"
cls
goto addtarstrques
) else (
set tarstr=*
goto eof
)
:addstring
cls
set /p addstr=[Target]
set addstr="*%addstr%*"
set tarstr=%addstr% %tarstr%
echo Searching for strings: %tarstr%
:addtarstrques
echo.
echo Is there an additional string you wish to look for?
set /p yn3={y,n}
if /i "%yn3%"=="y" goto addstring
goto eof
:startstring
:startloop
cls
echo Is there a standard starting string
echo to the naming convention?
set /p yn4={y,n}
if /i "%yn4%"=="y" (
cls
echo Enter standard start string
echo [Include an ending space if desired]
echo.
set /p startstr=
) else (
set startstr=
goto eof
)
echo The current start string is "%startstr%"
echo Is this okay?
set /p yn5={y,n}
if /i "%yn5%"=="n" (
set startstr=
goto startloop
)
goto eof
:endstring
cls
echo Is there a standard ending string to the naming convention?
set /p yn5={y,n}
if /i "%yn5%"=="n" (
set endstr=
goto eof
)
cls
echo Would you like the end string to
echo include the date the file was created
set /p DateEnd=[y,n]
cls
if /i "%DateEnd%"=="y" call :DateEndFormatting
cls
echo Would you like the end string to include
echo today's date
set /p yn6={y,n}
cls
echo Enter standard end string
echo [Include spaces if desired]
set /p origendstr=
if /i "%yn6%"=="y" call :DateTodayFormatting
if "%DateEnd%"=="y" set origendstr=%origendstr%[date created]
echo The current end string is "%origendstr%"
echo Is this okay?
set /p yn7={y,n}
if /i "%yn7%"=="n" (
set origendstr=
goto endstring
)
if /i "%DateEnd%"=="y" set origendstr=%origendstr:~0,-14%
goto eof
:DateEndFormatting
echo In what format would you like the
echo date to appear:
echo.
echo 1. dd Mmm yy
echo.
echo 2. yyyymmdd
echo.
echo 3. Mmm dd, yyyy
echo.
echo 4. mm/dd/yy
echo.
echo 5. More...
echo.
set /p DateEndForm=Selection {1-5}-
if "%DateEndForm%"=="5" goto more
goto dateendskip
:more
cls
echo 6. dd Mmm yyyy
echo.
echo 7. yy/mm/dd
echo.
echo 8. mm/dd/yyyy
echo.
echo 9. yymmdd
echo.
set /p DateEndForm=Selection {6-9}-
:dateendskip
goto eof
:DateTodayFormatting
echo In what format would you like the
echo date to appear:
echo.
echo 1. dd Mmm yy
echo.
echo 2. yyyymmdd
echo.
echo 3. Mmm dd, yyyy
echo.
echo 4. mm/dd/yy
echo.
echo 5. More...
echo.
set /p DateTodayForm=Selection {1-5}-
if "%DateTodayForm%"=="5" goto more
goto settodayform
:more
cls
echo 6. dd Mmm yyyy
echo.
echo 7. yy/mm/dd
echo.
echo 8. mm/dd/yyyy
echo.
echo 9. yymmdd
echo.
set /p DateTodayForm=Selection {6-9}-
:settodayform
if "%date:~4,2%"=="01" set todaymonth=Jan
if "%date:~4,2%"=="02" set todaymonth=Feb
if "%date:~4,2%"=="03" set todaymonth=Mar
if "%date:~4,2%"=="04" set todaymonth=Apr
if "%date:~4,2%"=="05" set todaymonth=May
if "%date:~4,2%"=="06" set todaymonth=Jun
if "%date:~4,2%"=="07" set todaymonth=Jul
if "%date:~4,2%"=="08" set todaymonth=Aug
if "%date:~4,2%"=="09" set todaymonth=Sep
if "%date:~4,2%"=="10" set todaymonth=Oct
if "%date:~4,2%"=="11" set todaymonth=Nov
if "%date:~4,2%"=="12" set todaymonth=Dec
if "%DateTodayForm%"=="1" set origendstr=%origendstr%%date:~7,2% %todaymonth% %date:~12%
if "%DateTodayForm%"=="2" set origendstr=%origendstr%%date:~10%%date:~4,2%%date:~7,2%
if "%DateTodayForm%"=="3" set origendstr=%origendstr%%todaymonth% %date:~7,2%, %date:~10%
if "%DateTodayForm%"=="4" set origendstr=%origendstr%%date:~4,6%%date:~12%
if "%DateTodayForm%"=="6" set origendstr=%origendstr%%date:~7,2% %todaymonth% %date:~10%
if "%DateTodayForm%"=="7" set origendstr=%origendstr%%date:~12%/%date:~4,5%
if "%DateTodayForm%"=="8" set origendstr=%origendstr%%date:~4%
if "%DateTodayForm%"=="9" set origendstr=%origendstr%%date:~12,2%%date:~4,2%%date:~7,2%
goto eof
:DateEndSet
if "!FileDate:~0,2!"=="01" set month=Jan
if "!FileDate:~0,2!"=="02" set month=Feb
if "!FileDate:~0,2!"=="03" set month=Mar
if "!FileDate:~0,2!"=="04" set month=Apr
if "!FileDate:~0,2!"=="05" set month=May
if "!FileDate:~0,2!"=="06" set month=Jun
if "!FileDate:~0,2!"=="07" set month=Jul
if "!FileDate:~0,2!"=="08" set month=Aug
if "!FileDate:~0,2!"=="09" set month=Sep
if "!FileDate:~0,2!"=="10" set month=Oct
if "!FileDate:~0,2!"=="11" set month=Nov
if "!FileDate:~0,2!"=="12" set month=Dec
if "%DateEndForm%"=="1" set endstr=%origendstr%!FileDate:~3,2! !month! !FileDate:~8,2!
if "%DateEndForm%"=="2" set endstr=%origendstr%!FileDate:~6,4!!FileDate:~0,2!!FileDate:~3,2!
if "%DateEndForm%"=="3" set endstr=%origendstr%!month! !FileDate:~3,2!, !FileDate:~6,2!
if "%DateEndForm%"=="4" set endstr=%origendstr%!FileDate:~0,6!!FileDate:~8,2!
if "%DateEndForm%"=="6" set endstr=%origendstr%!FileDate:~3,2! !month! !FileDate:~6,2!
if "%DateEndForm%"=="7" set endstr=%origendstr%!FileDate:~8,2!!FileDate:~0,5!
if "%DateEndForm%"=="8" set endstr=%origendstr%!FileDate:~0,10!
if "%DateEndForm%"=="9" set endstr=%origendstr%!FileDate:~8,2!!FileDate:~0,2!!FileDate:~3,2!
goto eof
:SetOldFilePath
set OldFilePath=!OldFilePath:~-25,-1!
:filepathloop
echo !OldFilePath! | find "\" >nul
if errorlevel 1 goto eof
set OldFilePath=!OldFilePath:~1!
goto filepathloop
:EditNameSubroutine
:editname
cls
echo !OldName!
echo 012345678911111111112222222222333333333344444444445555555555
echo 01234567890123456789012345678901234567890123456789
echo.
set /p NameStart=Enter Start Position-
set /p NameEnd=Enter End Position-
set /a NameLength=1+!NameEnd!-!NameStart!
if /i "%DateEnd%"=="y" call :DateEndSet else set endstr=%origendstr%
call set NewName=%%OldName:~!NameStart!,!NameLength!%%
cls
echo !NewName!
echo Would you like to make changes to this part
echo {Start and end strings will be added later}
echo.
set /p yn10={y,n}
if /i "!yn10!"=="y" (
call :setcaps
cls
echo !NewName!
echo.
echo Would you like to insert anything into the name
set /p yn8={y,n}
if /i "!yn8!"=="y" call :insertsubroutine
cls
echo !NewName!
echo.
echo Would you like to remove anything from the name
set /p yn12={y,n}
if /i "!yn12!"=="y" call :removesubroutine
)
cls
echo !NewName!
echo.
echo Do you need to make any other changes?
echo.
set /p yn15={y,n}
if "%yn15%"=="y" goto editname
set NewName=!startstr!!NewName!!endstr!!Extension!
cls
echo.
echo !NewName!
echo.
echo Is this correct
set /p yn9={y,n}
if /i "!yn9!"=="y" (
echo !NewName! from !OldName!!Extension! >>%origdir%\Renamelog.txt
ren "!OldFilePathAndName!" "!NewName!"
set /a numnam=!numnam!+1
) else (
cls
echo Would you like to try again
echo.
set /p yn12={y,n}
if /i "!yn12!"=="y" goto editname
)
goto eof
:setcaps
set NewName=!NewName:A=a!
set NewName=!NewName:B=b!
set NewName=!NewName:C=c!
set NewName=!NewName:D=d!
set NewName=!NewName:E=e!
set NewName=!NewName:F=f!
set NewName=!NewName:G=g!
set NewName=!NewName:H=h!
set NewName=!NewName:I=i!
set NewName=!NewName:J=j!
set NewName=!NewName:K=k!
set NewName=!NewName:L=l!
set NewName=!NewName:M=m!
set NewName=!NewName:N=n!
set NewName=!NewName:O=o!
set NewName=!NewName:P=p!
set NewName=!NewName:Q=q!
set NewName=!NewName:R=r!
set NewName=!NewName:S=s!
set NewName=!NewName:T=t!
set NewName=!NewName:U=u!
set NewName=!NewName:V=v!
set NewName=!NewName:W=w!
set NewName=!NewName:X=x!
set NewName=!NewName:Y=y!
set NewName=!NewName:Z=z!
:caps
cls
echo !NewName!
echo.
set /p caps=How many capital letters?
if "!caps!"=="0" goto eof
for /l %%i in (1,1,!caps!) do (
cls
echo Capital Letter %%i
echo !NewName!
echo 012345678911111111112222222222333333333344444444445555555555
echo 01234567890123456789012345678901234567890123456789
set /p capoff=At Position-
set /a endcap=!capoff!+1
call set before=%%NewName:~0,!capoff!%%
call set capletter=%%NewName:~!capoff!,1%%
call set after=%%NewName:~!endcap!%%
set capletter=!capletter:a=A!
set capletter=!capletter:b=B!
set capletter=!capletter:c=C!
set capletter=!capletter:d=D!
set capletter=!capletter:e=E!
set capletter=!capletter:f=F!
set capletter=!capletter:g=G!
set capletter=!capletter:h=H!
set capletter=!capletter:i=I!
set capletter=!capletter:j=J!
set capletter=!capletter:k=K!
set capletter=!capletter:l=L!
set capletter=!capletter:m=M!
set capletter=!capletter:n=N!
set capletter=!capletter:o=O!
set capletter=!capletter:p=P!
set capletter=!capletter:q=Q!
set capletter=!capletter:r=R!
set capletter=!capletter:s=S!
set capletter=!capletter:t=T!
set capletter=!capletter:u=U!
set capletter=!capletter:v=V!
set capletter=!capletter:w=W!
set capletter=!capletter:x=X!
set capletter=!capletter:y=Y!
set capletter=!capletter:z=Z!
set NewName=!before!!capletter!!after!
)
cls
echo !NewName!
echo.
echo Are there any additional caps needed?
set /p yn14={y,n}
if /i "%yn14%"=="y" goto caps
goto eof
:insertsubroutine
:insertsub
cls
echo !NewName!
echo 012345678911111111112222222222333333333344444444445555555555
echo 01234567890123456789012345678901234567890123456789
echo To the **right** of what position would
echo you like to insert the string?
set /p strpos=Right of Position-
echo What would you like to insert
set /p stradd=[String]
call set NewName=%%NewName:~0,!strpos!%%!stradd!%%NewName:~!strpos!%%
cls
echo !NewName!
echo.
echo Is there anything else that needs to be added
set /p yn11={y,n}
if /i "!yn11!"=="y" goto insertsub
goto eof
:removesubroutine
:removesub
cls
echo !NewName!
echo 012345678911111111112222222222333333333344444444445555555555
echo 01234567890123456789012345678901234567890123456789
echo What are the start and end positions
echo of the string to be removed?
echo.
echo Note that the start position should be
echo the last character that you want to stay
echo and the end position the last character
echo you want deleted
echo.
set /p remstpos=Start Position-
set /p remenpos=End Position-
call set NewName=%%NewName:~0,!remstpos!%%%%NewName:~!remenpos!%%
cls
echo !NewName!
echo.
echo Do you need to remove anything else
set /p yn13={y,n}
if /i "!yn13!"=="y" goto removesub
goto eof
echo This script is %0
This script is Hello.bat
%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
thanks this makes sense, but defo aches my brain haha!
%~d0:\ is the root directory of that drive.
Correction: %~d0\ is the root directory of the drive on which the batch file is located. (The colon is included automatically)Where do you find this stuff?
Where do you find this stuff?
It's all in the Microsoft Command Line ReferenceLike this?
Like this?
Command-line Reference Updated: October 25, 2010
http://technet.microsoft.com/en-us/library/cc754340%28WS.10%29.aspx
@echo off
Title Alarm
:Main1
set HR=00
set MN=00
set SC=00
:Main
cls
Echo.set Time
Echo.%time%
Echo.Use Time Format 00:00:00
set /p HR=Hours:
goto T1
:T1
cls
Echo.set Time
Echo.%time%
Echo.%HR%:%MN%:%SC%
set /p MN=Mins:
Goto T2
:T2
cls
Echo.set Time
Echo.%time%
Echo.%HR%:%MN%:%SC%
set /p SC=Seconds:
goto T3
:T3
cls
Echo.set Time
Echo.%time%
Echo.%HR%:%MN%:%SC%
set /p Ok=Yes:1? No:2?=
if "%Ok%"=="1" Goto Cont
if /i "%Ok%"=="yes" Goto Cont
if "%Ok%"=="2" Goto Main1
if /i "%Ok%"=="no" Goto Main1
if "%Ok%"=="" Goto T3
if "%Ok%"=="%Ok%" Goto T3
:Cont
set TT=%HR%:%MN%:%SC%.00
cls
title %TT%
echo.%time%
if "%time%"=="%HR%:%MN%:%SC%.00" goto wake
goto Cont
:wake
Echo.Wake Up!!!
cd %programfiles%
cd *windows Media*
wmplayer "Path of your audio file"
Echo.Press A Key To Turn Off.
pause>nul
@echo off
title Maze by Lemonilla
set /p clr=<clr.maz
color %clr%
cd bin
:start
cls
echo 1 Casual
echo 2 Easy
echo 3 Moderate
echo 4 Hard
echo 5 Imposable
echo.
choice /c 12345 /n /m "Select Dificulty"
set f=1
cls
IF %errorlevel%==1 set mr=101
IF %errorlevel%==2 set mr=51
IF %errorlevel%==3 set mr=31
IF %errorlevel%==4 set mr=16
IF %errorlevel%==5 set mr=6
IF %errorlevel%==1 goto 1
IF %errorlevel%==2 goto 1
IF %errorlevel%==3 goto 1
IF %errorlevel%==4 goto 1
IF %errorlevel%==5 goto 1
goto start
:1
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 1
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 1
IF %errorlevel%==2 goto 1
IF %errorlevel%==3 goto 1
IF %errorlevel%==4 goto 3
IF %errorlevel%==5 goto 3
IF %errorlevel%==6 goto 2
goto 1
:2
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 2
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 1
IF %errorlevel%==2 goto 2
IF %errorlevel%==3 goto 2
IF %errorlevel%==4 goto 3
IF %errorlevel%==5 goto 4
IF %errorlevel%==6 goto 5
goto 2
:3
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 3
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 1
IF %errorlevel%==2 goto 1
IF %errorlevel%==3 goto 8
IF %errorlevel%==4 goto 9
IF %errorlevel%==5 goto 9
IF %errorlevel%==6 goto 2
goto 3
:4
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 4
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 6
IF %errorlevel%==2 goto 2
IF %errorlevel%==3 goto 7
IF %errorlevel%==4 goto 7
IF %errorlevel%==5 goto 6
IF %errorlevel%==6 goto 5
goto 4
:5
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 5
echo Moves Remaining: %mr%
type r2.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 2
IF %errorlevel%==2 goto 4
IF %errorlevel%==3 goto 14
IF %errorlevel%==4 goto 6
IF %errorlevel%==5 goto 7
goto 5
:6
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 6
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 5
IF %errorlevel%==2 goto 4
IF %errorlevel%==3 goto 7
IF %errorlevel%==4 goto 7
IF %errorlevel%==5 goto 6
IF %errorlevel%==6 goto 6
goto 6
:7
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 7
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 4
IF %errorlevel%==2 goto 4
IF %errorlevel%==3 goto 9
IF %errorlevel%==4 goto 5
IF %errorlevel%==5 goto 6
IF %errorlevel%==6 goto 6
goto 7
:8
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 8
echo Moves Remaining: %mr%
type r5.maz
echo.
echo.
choice /c abcd /n /m "Select Door"
IF %errorlevel%==1 goto 8
IF %errorlevel%==2 goto 8
IF %errorlevel%==3 goto 9
IF %errorlevel%==4 goto 3
goto 8
:9
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 9
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 3
IF %errorlevel%==2 goto 8
IF %errorlevel%==3 goto 9
IF %errorlevel%==4 goto 9
IF %errorlevel%==5 goto 7
IF %errorlevel%==6 goto 3
goto 9
:10
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 10
echo Moves Remaining: %mr%
type r4.maz
echo.
echo.
choice /c abcdefgh /n /m "Select Door"
IF %errorlevel%==1 goto 3
IF %errorlevel%==2 goto 3
IF %errorlevel%==3 goto 11
IF %errorlevel%==4 goto 12
IF %errorlevel%==5 goto 13
IF %errorlevel%==6 goto 14
IF %errorlevel%==7 goto 10
IF %errorlevel%==8 goto 10
goto 10
:11
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 11
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 10
IF %errorlevel%==2 goto 3
IF %errorlevel%==3 goto 6
IF %errorlevel%==4 goto 12
IF %errorlevel%==5 goto 12
IF %errorlevel%==6 goto 12
goto 11
:12
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 12
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 11
IF %errorlevel%==2 goto 11
IF %errorlevel%==3 goto 11
IF %errorlevel%==4 goto 6
IF %errorlevel%==5 goto 13
IF %errorlevel%==6 goto 10
goto 12
:13
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 13
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 14
IF %errorlevel%==2 goto 10
IF %errorlevel%==3 goto 12
IF %errorlevel%==4 goto cf%f%
IF %errorlevel%==5 goto 14
IF %errorlevel%==6 goto 14
goto 13
:14
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 14
echo Moves Remaining: %mr%
type r3.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 13
IF %errorlevel%==2 goto 13
IF %errorlevel%==3 goto 10
IF %errorlevel%==4 goto 13
IF %errorlevel%==5 goto 5
goto 14
:cf1
cls
0>nul set /p=Floor: #
0>nul set /p=Room: #
echo Moves Remaining: %mr%
echo Congrats! You have compleated Floor 1
set /a f+=1
echo.
echo.
echo You earn an extra 10 turns!
set /a mr+=10
pause>nul
goto 15
:15
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 15
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 15
IF %errorlevel%==3 goto 15
IF %errorlevel%==4 goto 21
IF %errorlevel%==5 goto 20
IF %errorlevel%==6 goto 16
goto 15
:16
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 16
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 15
IF %errorlevel%==3 goto 20
IF %errorlevel%==4 goto 20
IF %errorlevel%==5 goto 18
IF %errorlevel%==6 goto 17
goto 16
:17
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 17
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 16
IF %errorlevel%==3 goto 18
IF %errorlevel%==4 goto 18
IF %errorlevel%==5 goto 15
IF %errorlevel%==6 goto 15
goto 17
:18
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 18
echo Moves Remaining: %mr%
type r6.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 16
IF %errorlevel%==2 goto 17
IF %errorlevel%==3 goto 17
IF %errorlevel%==4 goto 24
IF %errorlevel%==5 goto 19
goto 18
:19
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 19
echo Moves Remaining: %mr%
type r2.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 27
IF %errorlevel%==2 goto 27
IF %errorlevel%==3 goto 18
IF %errorlevel%==4 goto 23
IF %errorlevel%==5 goto 24
goto 19
:20
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 20
echo Moves Remaining: %mr%
type r6.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 16
IF %errorlevel%==3 goto 16
IF %errorlevel%==4 goto 23
IF %errorlevel%==5 goto 21
goto 20
:21
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 21
echo Moves Remaining: %mr%
type r2.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 22
IF %errorlevel%==3 goto 20
IF %errorlevel%==4 goto 23
IF %errorlevel%==5 goto 23
goto 21
:22
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 22
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 21
IF %errorlevel%==2 goto 15
IF %errorlevel%==3 goto 15
IF %errorlevel%==4 goto 15
IF %errorlevel%==5 goto 15
IF %errorlevel%==6 goto 21
goto 22
:23
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 23
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 20
IF %errorlevel%==2 goto 21
IF %errorlevel%==3 goto 15
IF %errorlevel%==4 goto 15
IF %errorlevel%==5 goto 15
IF %errorlevel%==6 goto 19
goto 23
:24
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 24
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 18
IF %errorlevel%==2 goto 19
IF %errorlevel%==3 goto 15
IF %errorlevel%==4 goto 15
IF %errorlevel%==5 goto 15
IF %errorlevel%==6 goto 15
goto 24
:25
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 25
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 15
IF %errorlevel%==3 goto 15
IF %errorlevel%==4 goto 28
IF %errorlevel%==5 goto 27
IF %errorlevel%==6 goto 26
goto 25
:26
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 26
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 15
IF %errorlevel%==2 goto 25
IF %errorlevel%==3 goto 27
IF %errorlevel%==4 goto 29
IF %errorlevel%==5 goto 15
IF %errorlevel%==6 goto 15
goto 26
:27
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 27
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 19
IF %errorlevel%==2 goto 25
IF %errorlevel%==3 goto 28
IF %errorlevel%==4 goto 15
IF %errorlevel%==5 goto 29
IF %errorlevel%==6 goto 26
goto 27
:28
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 28
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 25
IF %errorlevel%==2 goto 15
IF %errorlevel%==3 goto 15
IF %errorlevel%==4 goto 15
IF %errorlevel%==5 goto cf%f%
IF %errorlevel%==6 goto 27
goto 28
:29
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 29
echo Moves Remaining: %mr%
type r1.maz
echo.
echo.
choice /c abcdef /n /m "Select Door"
IF %errorlevel%==1 goto 26
IF %errorlevel%==2 goto 27
IF %errorlevel%==3 goto cf%f%
IF %errorlevel%==4 goto 15
IF %errorlevel%==5 goto 15
IF %errorlevel%==6 goto 15
goto 29
:cf2
cls
0>nul set /p=Floor: #
0>nul set /p=Room: #
echo Moves Remaining: %mr%
echo Congrats! You have compleated Floor %f%
set /a f+=1
echo.
echo.
echo You earn an extra 10 turns!
set /a mr+=10
pause>nul
set /a RNG=4*%random%/32768+1
if %RNG% EQU 1 goto 30
if %RNG% EQU 2 goto 32
if %RNG% EQU 3 goto 34
if %RNG% EQU 4 goto 36
:30
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 30
echo Moves Remaining: %mr%
type r8.maz
echo.
echo.
choice /c abcd /n /m "Select Door"
IF %errorlevel%==1 goto 31
IF %errorlevel%==2 goto 30
IF %errorlevel%==3 goto 37
IF %errorlevel%==4 goto 30
goto 30
:31
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 31
echo Moves Remaining: %mr%
type r3.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 32
IF %errorlevel%==2 goto 32
IF %errorlevel%==3 goto 30
IF %errorlevel%==4 goto 30
IF %errorlevel%==5 goto 34
goto 31
:32
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 32
echo Moves Remaining: %mr%
type r8.maz
echo.
echo.
choice /c abcd /n /m "Select Door"
IF %errorlevel%==1 goto 32
IF %errorlevel%==2 goto 33
IF %errorlevel%==3 goto 32
IF %errorlevel%==4 goto 31
goto 32
:33
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 33
echo Moves Remaining: %mr%
type r2.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 32
IF %errorlevel%==2 goto 32
IF %errorlevel%==3 goto 38
IF %errorlevel%==4 goto 34
IF %errorlevel%==5 goto 34
goto 33
:34
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 34
echo Moves Remaining: %mr%
type r8.maz
echo.
echo.
choice /c abcd /n /m "Select Door"
IF %errorlevel%==1 goto 33
IF %errorlevel%==2 goto 34
IF %errorlevel%==3 goto 35
IF %errorlevel%==4 goto 34
goto 34
:35
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 35
echo Moves Remaining: %mr%
type r10.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 36
IF %errorlevel%==2 goto 36
IF %errorlevel%==3 goto 34
IF %errorlevel%==4 goto 34
IF %errorlevel%==5 goto 32
goto 35
:36
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 36
echo Moves Remaining: %mr%
type r8.maz
echo.
echo.
choice /c abcd /n /m "Select Door"
IF %errorlevel%==1 goto 36
IF %errorlevel%==2 goto 35
IF %errorlevel%==3 goto 36
IF %errorlevel%==4 goto 37
goto 36
:37
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 37
echo Moves Remaining: %mr%
type r9.maz
echo.
echo.
choice /c abcde /n /m "Select Door"
IF %errorlevel%==1 goto 36
IF %errorlevel%==2 goto 36
IF %errorlevel%==3 goto 30
IF %errorlevel%==4 goto 30
IF %errorlevel%==5 goto 36
goto 37
:38
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 38
echo Moves Remaining: %mr%
type r7.maz
echo.
echo.
choice /c abcdefgh /n /m "Select Door"
IF %errorlevel%==1 goto 32
IF %errorlevel%==2 goto 33
IF %errorlevel%==3 goto 34
IF %errorlevel%==4 goto 35
IF %errorlevel%==5 goto 36
IF %errorlevel%==6 goto 37
IF %errorlevel%==7 goto 39
IF %errorlevel%==8 goto 31
goto 38
:39
set /a mr-=1
if "%mr%"=="0" goto lose
cls
0>nul set /p=Floor: %f%
0>nul set /p=Room: 39
echo Moves Remaining: %mr%
type r8.maz
echo.
echo.
choice /c abcd /n /m "Select Door"
IF %errorlevel%==1 goto 38
IF %errorlevel%==2 goto 30
IF %errorlevel%==3 goto 32
IF %errorlevel%==4 goto cf%f%
goto 39
:cf3
cls
0>nul set /p=Floor: #
0>nul set /p=Room: #
echo Moves Remaining: %mr%
echo Congrats! You have compleated Floor %f%
set /a f+=1
echo.
echo.
echo You earn an extra 10 turns!
set /a mr+=10
pause>nul
:end
set /a mr-=1
cls
Echo You Win With %mr% Turns Remaining!
pause>nul
goto start
:lose
echo You Lose!
pause>nul
goto start
/----B-----C----\
| |
| |
A D
| |
| |
\----F-----E----/
r2.maz\---A---B---\
\ |
\ C |
\ D
\ |
\ |
\ |
\ E
\ |
\ |
\-/
r3.maz/--A---B--/
| /
D E /
| /
| /
C /
| /
|--/
r4.maz/-----B----------C--------D-----\
| |
| |
| |
A E
| |
| |
| |
\-----H----------G--------F-----/
r5.maz/--A----B--\
| |
\--D----C--/
r6.maz|--\
| \
A \
| \
| \
B E \
| \
\--C---D--\
r7.maz /------A-----\
/ \
H B
/ \
/ \
| |
| |
G C
| |
| |
\ /
\ /
F D
\ /
\------E-----/
r8.maz/-A-\
D B
\-C-/
r9.maz|--\
| \
D \
| \
| \
C E \
| \
\--A---B--\
r10.maz /--|
/ |
/ D
/ |
/ |
/ |
/ c
/ E |
/ |
/---A---B---/
@echo off
pause
echo 100%
pause
echo 30%
pause
how to fix said example@echo off
pause
echo 100%%%
pause
echo 30%%%
pause
@echo off
title Wow Moniter v2
:restart
cls
set y=0
for /f "tokens=1" %%a in ('tasklist') do if "%%a"=="(Prosses Name)" goto next
for /f "tokens=1" %%b in ('tasklist') do if "%%b"=="(This Line Not Needed Was Part of orginal File)" taskkill /f /im %%b
if "%y%"=="0" start "" "(link to proccess or program)"
Echo.Waiting For Launcher.exe
timeout /nobreak /t 10
goto restart
:next
set y=1
goto restart
@echo off
Title RPS by millergram
color 02
:title
set Com=0
set Hum=0
set R=1
set P=2
set S=3
set C=0
set H=0
set /p UserName=Type Name Here:
:main
cls
echo.1=rock 2=paper 3=Siccors
echo.Computer's Score=%Com%
echo.%UserName%'s Score=%Hum%
set /p Input=RPS?:
if /I "%Input%"=="1" goto rock
if /I "%Input%"=="2" goto paper
if /I "%Input%"=="3" goto sicc
if /I "%Input%"=="%Input%" goto main
goto main
:rock
set H=1
set /a C=(%random% %%2)+1
if %C% equ 1 goto RT
if %C% equ 2 goto RL
if %C% equ 3 goto RW
:RT
cls
echo.%UserName% chose Rock Computer chose Rock too!
echo.Its a tie!
Echo.Press A Key...
Pause>nul
goto main
:RL
cls
set /a Com=%Com%+1
echo.%UserName% chose Rock Computer Chose Paper!
echo.You Loose!
Echo.Press A Key...
Pause>nul
goto main
:RW
cls
set /a Hum=%Hum%+1
echo.%UserName% chose Rock Computer Chose Siccors!
echo.you win!
Echo.Press A Key...
Pause>nul
goto main
:paper
set H=2
set /a C=(%random% %%2)+1
if %C% equ 2 goto PT
if %C% equ 3 goto PL
if %C% equ 1 goto PW
:PT
cls
echo.%UserName% chose Paper Computer chose Paper too!
echo.Its a tie!
Echo.Press A Key...
Pause>nul
goto main
:PL
cls
set /a Com=%Com%+1
echo.%UserName% chose Paper Computer Chose Siccors!
echo.You Loose!
Echo.Press A Key...
Pause>nul
goto main
:PW
cls
set /a Hum=%Hum%+1
echo.%UserName% chose Paper Computer Chose Rock!
echo.you win!
Echo.Press A Key...
Pause>nul
goto main
:sicc
set H=3
set /a C=(%random% %%2)+1
if %C% equ 3 goto ST
if %C% equ 1 goto SL
if %C% equ 2 goto SW
:ST
cls
echo.%UserName% chose Siccors Computer chose Siccors too!
echo.Its a tie!
Echo.Press A Key...
Pause>nul
goto main
:SL
cls
set /a Com=%Com%+1
echo.%UserName% chose Siccors Computer Chose Rock!
echo.You Loose!
Echo.Press A Key...
Pause>nul
goto main
:SW
cls
set /a Hum=%Hum%+1
echo.%UserName% chose Siccors Computer Chose Paper!
echo.you win!
Echo.Press A Key...
Pause>nul
goto main
Your link is broken.
FWIW - this is IRL and the gameplay sucks. People will check stuff out if they are looking for a tool to solve a task, or if they are bored and have time to kill.
And you gave away the punch line - saying how it solves the maze.
Maybe you should have posted the batch code instead of a dropbox download??
ok i need a basic bat file i need it to be able to send an emulated press of a key (up arrow) to the active window every 10-20 secs (random)I removed your email address for two reasons:
if u make one email it to me at email address removed by Allan
-generikk
@echo off
setlocal EnableDelayedExpansion
set num_args=0
:loop
set findArg_value=%1
set f |find "findArg_value" 1>nul 2>&1
if "%errorlevel%"=="0" (
set /a num_args+=1
shift
goto loop
)
set findArg_value=
echo %num_args%
@echo %%A
echo off
echo.
echo This file is :
echo %~dpnx0
echo.
echo This file compresses all BIN found if less then 13825 bytes
echo via RCS with Exomizer and ZX7 for Z80 use
echo the final result is stored in the map SMALL
echo.
if not exist zx7.exe (
echo you need to install zx7
echo http://www.worldofspectrum.org/infoseekid.cgi?id=0027996
pause 1
goto :eof
)
if not exist exomizer.exe (
echo you need to install Exomizer
echo http://hem.bredband.net/magli143/exo/
pause 1
goto :eof
)
if not exist rcs.exe (
echo you need to install RCS
echo http://www.worldofspectrum.org/infoseek.cgi?regexp=^Reverse+Computer+Screen$
pause 1
goto :eof
)
if exist sleep.exe do sleep 60
set Q=%%A
set X=.rcs
set Y=.zx7
set Z=.exo
set R=%Q%%X%
set S=%Q%%Y%
set T=%Q%%Z%
mkdir small
FOR %Q% IN (*.bin) DO (
set Q=%%A
set X=.rcs
set Y=.zx7
set Z=.exo
set R=%Q%%X%
set S=%Q%%Y%
set T=%Q%%Z%
VERIFY OTHER 2>nul REM create an error
setlocal enableextentions
IF ERRORLEVEL 1 echo Unable to enable extensions
VERIFY OTHER 2>nul REM create an error
setlocal enabledelayedexpansion
IF ERRORLEVEL 1 echo Unable to enable delayed expansion
set Q=%%A
set X=.rcs
set Y=.zx7
set Z=.exo
set R=%Q%%X%
set S=%Q%%Y%
set T=%Q%%Z%
cls
echo file: %Q% startlength: %%~zA
rcs.exe %Q%
zx7.exe %Q%
exomizer raw -q %Q% -o %T%
zx7.exe %R%
exomizer raw -q %R% -o %R%%Z%
move %R% small/%R%
move %S% small/%S%
move %T% small/%T%
move %R%%Y% small/%R%%Y%
move %R%%Z% small/%R%%Z%
cd small
echo.
set I=0
for /f "delims=" %%O in ('dir /Os /b %Q%.*') do (
echo File %%O %%~zO bytes
call :recurse
echo.
)
rem move *.* ..
cd ..
rem echo remove map
rem RD small
endlocal
)
goto :eof
:recurse
set I=0
cd
REM view all files, EXCEPT directories.
FOR /f "tokens=*" %%P IN ('dir /Os /A-d /b %Q%.*') do (call :showfiles "%%P")
set count=%I%
echo Filecount: %count%
REM echo recurse I %I% C %count% %Q%
goto :eof
:showfiles
set /a I+=1
if "%I%" GTR "1" (
del %1
echo %1 deleted
) ELSE (
echo SMALLEST FOUND = %1
)
goto :eof
@echo off
if "%1"=="-debug" (
shift
echo on
)
setlocal EnableDelayedExpansion
set "output= "
set "drv=%cd:~0,1%:"
set counter=0
::ADD MODIFYERS AND HELP MENU LATER
:mod
if "%1"=="/f" (
set "p=%~pdnx2"
shift
shift
goto :mod
)
if "%1"=="/l" (
set "output=%2> echo %%1"
shift
shift
goto :mod
)
if "%1"=="/d" (
set "drv=%2"
shift
shift
goto :mod
)
if "%1"=="/F" (
set "p=%~pdnx2"
shift
shift
goto :mod
)
if "%1"=="/L" (
set "output=%2> echo %%1"
shift
shift
goto :mod
)
if "%1"=="/D" (
set "drv=%2"
shift
shift
goto :mod
)
if "%1"=="/?" goto :help
set "p=%~pdnx1"
::Find Matches
echo.
for /r %drv%\ %%A in (*.*) do (
fc /b /LB0 "%p%" "%%A" >nul 2>&1
if !errorlevel! EQU 0 call :match %%A
)
echo.
echo Done, %counter% matches were found.
exit /b
:match
if "%~pdnx1"=="%p%" goto :eof
%output%
echo %1
set /a counter+=1
goto :eof
:help
echo Searches drive for any copies of the input file.
echo.
echo FINDMATCH ^[^/d drive:^] ^[^/l filename1^] ^[^/f filename2^]
echo.
echo. /F Specifies the file.
echo. /L Logs the output in a file.
echo. /D Specifies the drive to search.
echo.
exit /b
:: Verison 1.5
:: Windows 7 program, use under any other OS at your own risk.
@echo off
if "%1"=="-debug" (
shift
echo on
)
timeout /t 0 >nul || goto :error.2
set "root=%~pd0"
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
for /f "tokens=1,2 delims==" %%A in ('wmic path win32_localtime get day^,dayofweek^,weekinmonth^,month^,year /value') do (
if not "%%A"=="" if not "%%B"=="" set %%A=%%B
)
::Constants
set TodaysColor=0f
set a=0
set b=0
set dow=%DayOfWeek%
set wim=%WeekInMonth%
set m=%month%
set /a m1=%m%-1
set today=%day%
set mod=%~1
if not "%mod%"=="" goto :modifyers
call :make.cal
goto :end
:make.Cal
if "%m%"=="1" set end=31
if "%m%"=="2" set end=28
if "%m%"=="3" set end=31
if "%m%"=="4" set end=30
if "%m%"=="5" set end=31
if "%m%"=="6" set end=30
if "%m%"=="7" set end=31
if "%m%"=="8" set end=31
if "%m%"=="9" set end=30
if "%m%"=="10" set end=31
if "%m%"=="11" set end=30
if "%m%"=="12" set end=31
if "%m%"=="1" set "m.name= January (1)"
if "%m%"=="2" set "m.name= February (2)"
if "%m%"=="3" set "m.name= March (3)"
if "%m%"=="4" set "m.name= April (4)"
if "%m%"=="5" set "m.name= May (5)"
if "%m%"=="6" set "m.name= June (6)"
if "%m%"=="7" set "m.name= July (7)"
if "%m%"=="8" set "m.name= August (8)"
if "%m%"=="9" set "m.name= September (9)"
if "%m%"=="10" set "m.name= October (10)"
if "%m%"=="11" set "m.name= November (11)"
if "%m%"=="12" set "m.name= December (12)"
if "%m1%"=="1" set past=31
if "%m1%"=="2" set past=28
if "%m1%"=="3" set past=31
if "%m1%"=="4" set past=30
if "%m1%"=="5" set past=31
if "%m1%"=="6" set past=30
if "%m1%"=="7" set past=31
if "%m1%"=="8" set past=31
if "%m1%"=="9" set past=30
if "%m1%"=="10" set past=31
if "%m1%"=="11" set past=30
if "%m1%"=="12" set past=31
:loop.diw
if %dow% EQU 1 goto :loop.wim
set /a dow-=1
set /a day-=1
goto :loop.diw
:loop.wim
set /a wim-=1
set /a day-=7
if %day% LSS 0 (
set /a day=%past%%day%
set b=1
goto :loop.end
)
goto :loop.wim
:loop.end
echo.
echo.%m.name%
echo Mon Tue Wed Thu Fri Sat Sun
echo --- --- --- --- --- --- ---
echo.
:loop.week
set input=0
if "%day:~1,1%"=="" set day=0%day%
if not %input% EQU 1 for /f "tokens=1,2,3 delims=:" %%A in (h.txt) do if %year% EQU %%A if %m% EQU %%B if %day% EQU %%C call :ColorText 0c "%day%" && set input=1 && 0>nul set /p"=. "
if not %input% EQU 1 if %day%==%today% call :ColorText %todaysColor% "%day%" && set input=1 && 0>nul set /p"=. "
if not %input% EQU 1 if exist %~pd0\d.txt for /f "tokens=1,2 delims=:" %%A in (d.txt) do if %m% EQU %%A if %day% EQU %%B call :ColorText 05 "%day%" && set input=1 && 0>nul set /p"=. "
if not %input% EQU 1 if not %day%==%today% 0>nul set /p"=%day%. "
if "%day:~0,1%"=="0" set day=%day:~1,1%
set /a day+=1
set /a dow+=1
if %dow% GTR 7 (
set dow=1
set /a wim+=1
echo.
if %a%==1 if %b%==0 goto :loop.end
)
if %b%==0 if %day% GTR %end% (
set day=1
set /a m+=1
set a=1
)
if %b%==1 if %day% GTR %past% (
set day=1
set b=0
)
goto :loop.week
:loop.end
echo.
goto :eof
:ColorText
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof
:modifyers
set output=0
if "%mod:~0,3%"=="/a:" (
call :make.cal
for /f "tokens=1-3 delims=:" %%A in ("!mod:~3!") do (
set b_=%%B
if "!b_:~1,1!"=="" set b_=0!b_!
echo %%A:!b_!:%%C >>%root%\d.txt && echo Date Added.
)
goto :end
)
if "%mod:~0,3%"=="/r:" if exist %root%\d.txt (
call :make.cal
for /f "tokens=1,2 delims=:" %%A in ("!mod:~3!") do (
set b_=%%B
if "!b_:~1,1!"=="" set b_=0!b_!
for /f "tokens=1,2,3 delims=:" %%U in ('type "%root%\d.txt"') do (
if not "%%U:%%V"=="%%A:!b_!" echo %%U:%%V:%%W >>"%root%\d2.txt"
if "%%U:%%V"=="%%A:!b_!" echo Date Removed.
)
)
del /f "%root%d.txt"
if exist %root%\d2.txt rename "%root%d2.txt" "d.txt"
goto :end
) else (
call :make.cal
echo No dates entered.
goto :end
)
if "%mod:~0,3%"=="/d:" if exist %root%\d.txt (
call :make.cal
for /f "tokens=1,2 delims=:" %%A in ("%mod:~3%") do (
set b_=%%B
if "!b_:~1,1!"=="" set b_=0!b_!
for /f "tokens=1-3 delims=:" %%G in ('type "%root%\d.txt"') do (
if "%%G:%%H"=="%%A:!b_!" if not "%%I"=="" (set I=%%I && set I=!I:_= ! && echo !I!) else (echo No Comment)
)
for /f "tokens=1-4 delims=:" %%W in ('type "%root%\h.txt"') do (
if "%%W:%%X:%%Y"=="%year%:%%A:!b_!" if not "%%Z"=="" (set Z=%%Z && set Z=!Z:_= ! && echo !Z!) else (echo No Comment)
)
)
goto :end
)
if "%mod%"=="-b" goto :bug
REM Find Specific Day
call :make.cal
if "%mod%"=="/code" (
set output=1
SHIFT
)
for /f "tokens=1,2 delims=:" %%A in ("%mod:~1%") do (
set dayToFind=%%A
set WeekToFind=%%B
)
if "%dayToFind%"=="Su" ( set dayToFind_=7 && set daytofind+=Sunday) else (
if "%dayToFind%"=="Mo" ( set dayToFind_=1 && set daytofind+=Monday) else (
if "%dayToFind%"=="Tu" ( set dayToFind_=2 && set daytofind+=Tuesday) else (
if "%dayToFind%"=="We" ( set dayToFind_=3 && set daytofind+=Wednesday) else (
if "%dayToFind%"=="Th" ( set dayToFind_=4 && set daytofind+=Thursday) else (
if "%dayToFind%"=="Fr" ( set dayToFind_=5 && set daytofind+=Friday) else (
if "%dayToFind%"=="Sa" ( set dayToFind_=6 && set daytofind+=Saturday) else (
goto :error
)))))))
:loop.dow2
if %dow% LSS %dayToFind_% (
set /a dow+=1
set /a day+=1
)
if %dow% GTR %dayToFind_% (
set /a dow-=1
set /a day-=1
)
if not %dow% EQU %daytofind_% goto :loop.dow2
:loop.wim2
if %wim% LSS %WeekToFind% (
set /a wim+=1
set /a day+=7
)
if %wim% GTR %WeekToFind% (
set /a wim-=1
set /a day-=7
)
if %wim% GTR 8 goto :error
if %wim% LSS 0 goto :error
if not %wim% EQU %weekToFind% goto :loop.wim2
if %output%==0 (
if %weekToFind% == 1 echo The first %dayToFind+% occures on the %day%.
if %weekToFind% == 2 echo The second %dayToFind+% occures on the %day%.
if %weekToFind% == 3 echo The third %dayToFind+% occures on the %day%.
if %weekToFind% == 4 echo The forth %dayToFind+% occures on the %day%.
if %weekToFind% == 5 echo The fifth %dayToFind+% occures on the %day%.
if %weekToFind% == 6 echo The sixth %dayToFind+% occures on the %day%.
) else (
echo %day%
)
goto :end
:Bug
echo Known bugs:
echo. 1. /a does not support spaces or quotation marks.
echo. 2. /day does not work if the first instance of the given day appears
echo. on a week with the previous mounths, It gives the next instance instead.
echo.
goto :end
:error
echo Produces a calendar or date of a specific day.
echo.
echo cal [{/code} /Day:#] [/a:m:n:Note] [/r:m:n]
echo.
echo. /Day:# Finds the date for the specified day. Day is the first two
echo. letters of the day you wish to locate.
echo. # corresponds to the week of the month.
echo. /code Reformats the output to a more code friendly format.
echo. /code must come before /Day:#.
echo. /a:m:n:Note Creates a date that will appear on the calendar. m is the
echo. month, n is the day. Note is optional and will act as a
echo. reminder if you forget what happens on the date.
echo. Replace all instances of ^<space^> with underscore ^"_^".
echo. /r:m:n Removes an existing date from the calendar. m is the month
echo. and n is the day.
echo. /d:m:n Displays the comment corresponding with the date. m is the month
echo. and n is the day.
echo. -b Displays Known errors.
echo.
echo cal color codes certain dates. The colors and their meanings are below.
echo.
call :colortext %todayscolor% " Today"
echo.
call :colortext 0c " National Holiday"
echo.
call :colortext 02 " Daylight Savings Time"
echo.
call :colortext 05 " Saved Date"
echo.
echo.
echo Examples:
echo. cal
echo. cal /Su:2
echo. cal /code /Th:1
echo. cal /a:9:03:Birthday
echo. cal /r:9:3
echo. cal /d:9:03
:error.2
echo.
echo.(cal is a Windows 7 program and is not backwards compatible.)
echo.
:end
::::US Holidays
::::As shown on opm.gov
::::2013
2013:1:01:New_Years_Day
2013:1:21:Birthday_of_Dr_King_Jr
2013:2:18:Washingtons_Birthday
2013:5:27:Memorial_Day
2013:7:04:Independence_Day
2013:9:02:Labor_Day
2013:10:14:Columbus_Day
2013:11:03:Veterans_Day
2013:11:28:Thanksgiving_Day
2013:12:25:Christmas_Day
::::2014
2014:1:01:New_Years_Day
2014:1:20:Birthday_of_Dr_King_Jr
2014:2:17:Washingtons_Birthday
2014:5:26:Memorial_Day
2014:7:04:Independence_Day
2014:9:01:Labor_Day
2014:10:13:Columbus_Day
2014:11:11:Veterans_Day
2014:11:27:Thanksgiving_Day
2014:12:25:Christmas_Day
@echo off
rem for /f "delims==" %%f in ('set') do (
rem set %%f=
rem )
call language.bat
title The Dream Engine
echo What file do you want to use?
set /p name=^
>
set interpret.type[nul]=0
for /f "tokens=1* delims=." %%f in ("%name%") do (set test=%%g)
if "%test%"=="" (if not exist "%name%" (set name=%name%.txt))
set purpose=root
set layer=0
for /f "tokens=* usebackq delims=~" %%f in ("%name%") do (call :readline .%%f)
set indent=0
call :readline.lowerindent
title The %place%.
echo You are in a %place%.
:Inputloop
set input=
set /p input=^
>
if "%input%"=="" goto :inputloop
call :interpret %input%
goto :Inputloop
:debug
set debug
set interpret
set console
set hook
set type
set object
set event
goto :eof
:look
set look.counter=
set look.seen=
call :look.loop
goto :eof
:look.loop
set /a look.counter=look.counter+1
set list=
call :set id=%%object[%look.counter%]%%
call :set name=%%console.type[%id%]%%
call :set location=%%object.location[%look.counter%]%%
if "%name%"=="" (if "%look.test%"=="%objectcounter%" (goto :eof) else (goto :look.loop) )
rem set perspective[%look.seen%]=%look.counter%
rem set /a look.seen=look.seen+1
call :set mprop=%%type[%id%].properties%%
set prop=0
call :look.adj.loop
echo There is a %list%%name% %location%.
set look.test=%look.counter%
goto :look.loop
:look.adj.loop
if "%prop%"=="%mprop%" (goto :eof)
set /a prop=prop+1
call :set adj=%%object[%look.counter%].property[%prop%]%%
call :set adj=%%console.type[%id%].property[%prop%].adjective[%adj%]%%
if not "%adj%"=="" (set list=%list%%adj% )
goto :look.adj.loop
:hook.handle
for /f "tokens=1,2,3" %%f in ("%*") do (
set verb=%%f
set direct=%%g
set indirect=%%h
)
call :set directis=%%object[%direct%]%%
if "%indirect%"=="" (
set punc=.
set indirectis=
) else (
set punc=.
call :set indirectis=%%object[%indirect%]%%
)
call :set event=%%hook.action[%verb%].using[%directis%%punc%%indirectis%]%%
call :event %event% %hook.controlgroup% %direct% %indirect%
goto :eof
:event
for /f "tokens=1,2,3,4" %%a in ("%*") do (
set $id=%%a
set $part[0]=%%b
set $part[1]=%%c
set $part[2]=%%d
)
call :set $sb=%%object[%$part[0]%]%%
call :set $ob=%%object[%$part[1]%]%%
call :set $in=%%object[%$part[2]%]%%
call :set $sb=%%console.type[%$sb%]%%
call :set $ob=%%console.type[%$ob%]%%
call :set $in=%%console.type[%$in%]%%
call :set $script=%%event[%$id%]%%
set $task=action
:event.scriptloop
set $char=%$script:~0,1%
set $script=%$script:~1%
call :event.script.track[%$task%]
if not "%$script%"=="" goto :event.scriptloop
goto :eof
:event.script.track[action]
if "%$char%"=="?" (set $task=getterm
set $purpose=lhs)
if "%$char%"=="!" (set $task=getterm
set $purpose=dataleft)
if "%$char%"=="~" (set $task=number
set $purpose=delete)
if "%$char%"==":" (set $task=number
set $purpose=speak)
if "%$char%"=="{" (
if "%$purpose%"=="testelse" (set /a $nest=$nest+1
call :set $layer[%%$nest%%]=else)
if "%$purpose%"=="skipelse" (set $task=skipbrace
set $brace=1
set $purpose=else)
)
set $num=
if "%$char%"=="}" (call :event.script.track[action].handlenest)
goto :eof
:event.script.track[action].handlenest
call :set $layer=%%$layer[%$nest%]%%
if "%$layer%"=="if" (set $purpose=skipelse) else (set $purpose=)
goto :eof
:event.script.track[getterm]
if "%$char%"=="@" (set $task=partnum)
if "%$char%"=="#" (if not "%$purpose%"=="dataleft" (
set $task=number))
goto :eof
:event.script.track[partnum]
if "%$char%"=="." (set $task=field
call :set $rid=%%$part[%$part%]%%
set $part=
goto :eof
)
set $part=%$part%%$char%
goto :eof
:event.script.track[field]
if "%$char%"=="$" (set $task=getslotid
set $dtype=property
goto :eof)
if "%$char%"=="!" (set $task=getslotid
set $dtype=state
goto :eof)
if "%$char%"=="#" (set $task=getslotid
set $dtype=value
goto :eof)
if "%$char%"=="@" (set $task=closeterm.id
goto :eof)
if "%$char%"=="." (set $hold=%$rid%
call :set $rid=%%object[%$rid%].pointer[%$point%]%%
set $pslot=%$point%
set $point=
goto :eof
)
set $point=%$point%%$char%
goto :eof
:event.script.track[getslotid]
if "%$purpose%"=="lhs" (
if "%$char%"=="=" (goto :event.script.track[closeterm])
if "%$char%"=="~" (goto :event.script.track[closeterm])
)
if "%$purpose%"=="rhs" (if "%$char%"=="{" (goto :event.script.track[closeterm]))
if "%$purpose%"=="dataright" (if "%$char%"==";" (goto :event.script.track[closeterm]))
if "%$purpose%"=="dataleft" (
if "%$char%"=="=" (goto :event.script.track[close[dataleft]])
if "%$char%"=="+" (goto :event.script.track[close[dataleft]])
if "%$char%"=="-" (goto :event.script.track[close[dataleft]])
)
set $slotid=%$slotid%%$char%
goto :eof
:event.script.track[number]
if "%$purpose%"=="lhs" (
if "%$char%"=="=" (goto :event.script.track[closeterm])
if "%$char%"=="~" (goto :event.script.track[closeterm])
)
if "%$purpose%"=="rhs" (if "%$char%"=="{" (goto :event.script.track[close[rhs]]))
if "%$purpose%"=="speak" (if "%$char%"==";" (goto :event.script.track[close[speak]]))
if "%$purpose%"=="delete" (if "%$char%"==";" (goto :event.script.track[close[delete]]))
if "%$purpose%"=="dataright" (if "%$char%"==";" (goto :event.script.track[close[dataright]]))
set $num=%$num%%$char%
goto :eof
:event.script.track[closeterm]
call :set $num=%%object[%$rid%].%dtype%[%$slotid%]%%
if not "%$purpose%"=="dataleft%" (set $slotid=)
if "%$num%"=="" set $num=0
goto :event.script.track[close[%$purpose%]]
:event.script.track[closeterm.id]
set $num=%$rid%
if "%$purpose%"=="dataleft" (set $slotid=@)
goto :event.script.track[close[%$purpose%]]
:event.script.track[close[lhs]]
if "%$char%"=="=" (set $lhs.if=true) else (set $lhs.if=false)
set $lhs=%$num%
set $num=
set $purpose=rhs
set $task=getterm
goto :eof
:event.script.track[close[rhs]]
if "%$num%"=="%$lhs%" (set $num=true) else (set $num=false)
if "%$num%"=="%$lhs.if%" (set /a $nest=$nest+1
set $task=action
call :set $layer[%%$nest%%]=if) else (
set $task=skipbrace
set $brace=1
set $purpose=if)
goto :eof
:event.script.track[skipbrace]
if "%$char%"=="{" (set /a $brace=$brace+1)
if "%$char%"=="}" (set /a $brace=$brace-1)
if "%$brace%"=="0" (set $task=action
if "%$purpose%"=="if" (set $purpose=testelse) else (set $purpose=))
goto :eof
:event.script.track[close[dataleft]]
if "%$slotid%"=="@" (set $target.slot=%$pslot%
set $target.id=%$hold%
set $dtype=pointer
) else (
set $target.id=%$rid%
set $target.slot=%$slotid%
)
call :set $num=%%object[%$target.id%].%$dtype%[%$slotid%]%%
if "%$char%"=="="(set /a $base=) else (
if "%$char%"=="+"(set /a $base=$num) else (
if "%$char%"=="-"(set /a $base=$num*-1)))
set $num=
set $slotid=
set $purpose=dataright
set $task=getterm
goto :eof
:event.script.track[close[dataright]]
set /a object[%$target.id%].%dtype%[%$target.slot%]=$base+$num
set $num=
set $part=
set $slotid=
set $task=action
set $purpose=
goto :eof
:event.script.track[close[speak]]
call :set $output=%%event[%$id%].output[%$num%]%%
call :set $output=%%$output:$ob=%$ob%%%
call :set $output=%%$output:$sb=%$sb%%%
if not "%$in%"=="" (call :set $output=%%$output:$in=%$in%%%)
echo %$output%
set $task=action
set $purpose=
set $num=
goto :eof
:event.script.track[close[delete]]
call :set $num=%%$part[%$num%]%%
call :destroy %$num%
set $task=action
set $purpose=
set $num=
goto :eof
:destroy
for /f "tokens=1 delims==" %%f in ('set object[%*]') do (
set %%f=)
goto :eof
:interpret
set $string=%*
call :token 1 $verb=%$string%
call :set $command=%%interpret.hook.command[%$verb%]%%
if "%$command%"=="1" (goto :look)
if "%$command%"=="2" (goto :debug)
call :set $verb=%%interpret.hook.action[%$verb%]%%
set $parse=2
call :interpret.getobject
if "%$error%"=="1" (echo There doesn't seem to be any of those
goto :eof)
if "%$error%"=="2" (echo There is more than one of those
goto :eof)
set $direct=%$return%
call :token %$parse% $trans=%$string%
if "%$trans%"=="" (set $indirect=
call :hook.handle %$verb% %$direct%
goto :eof)
call :set $trans=%%interpret.lang.transterm[%$trans%]%%
set /a $parse=$parse+1
call :interpret.getobject
if "%$error%"=="1" (echo There doesn't seem to be any of those
goto :eof)
if "%$error%"=="2" (echo There is more than one of those
goto :eof)
set $indirect=%$return%
call :hook.handle %$verb% %$direct% %$indirect%
goto :eof
:interpret.getobject
set $error=0
set $isexp=true
call :token %$parse% $choicetype=%$string%
call :set $choicetype=%%interpret.lang.choicetype[%$choicetype%]%%
if "%$choicetype%"=="" (set $choicetype=1) else (set /a $parse=$parse+1)
set $transcheck=%$parse%
call :interpret.getobject.transloop
set /a $transcheck=$transcheck-1
call :token %$transcheck% $noun=%$string%
call :set $type=%%interpret.type[%$noun%]%%
if "%$transcheck%"=="%$parse%" (set $isexp=) else (call :interpret.getobject.adjloop)
set /a $parse=$parse+1
set $success=0
for /f "tokens=1* delims==" %%f in ('set object[') do (
for /f "tokens=2,3 delims=[]" %%h in ("%%f") do (set $test=%%h
set $junk=%%i)
set $testtype=%%g
call :interpret.getobject.compare)
if "%$success%"=="0" (set $error=1
goto :eof)
call :interpret.getobject.type[%$choicetype%]
for /f "tokens=1 delims==" %%f in ('set $success') do (
set %%f=
)
goto :eof
:interpret.getobject.type[1]
if not "%$success%"=="1" (set $error=2
goto :eof)
:interpret.getobject.type[2]
call :set $return=%%$success[1]%%
goto :eof
:interpret.getobject.type[3]
call :random $success=1 %$success%
call :set $return=%%$success[%$success%]%%
goto :eof
:interpret.getobject.compare
if not "%$junk%"=="" (goto :eof)
if not "%$testtype%"=="%$type%" goto :eof
set $failed=0
if "%$isexp%"=="true" (
for /f "tokens=1* delims==" %%f in ('set $describe[') do (set $lhs=%%f
set $rhs=%%g
call :interpret.getobject.compare.test)
)
if "%$failed%"=="0" (set /a $success=$success+1
call :set $success[%%$success%%]=%$test%)
goto :eof
:interpret.getobject.compare.test
for /f "tokens=2 delims=[]" %%f in ("%$lhs%") do (set $lhs=%%f)
call :set $lhs=%%object[%$test%].property[%$lhs%]%%
if not "%$lhs%"=="%$rhs%" set $failed=1
goto :eof
:interpret.getobject.adjloop
if "%$parse%"=="%$transcheck%" goto :eof
call :token %$parse% $adjective=%$string%
call :set $property=%%interpret.adjective[%$adjective%].type[%$type%].property%%
call :set $adjective=%%interpret.adjective[%$adjective%].type[%$type%]%%
set $describe[%$property%]=%$adjective%
set /a $parse=$parse+1
goto :interpret.getobject.adjloop
:interpret.getobject.transloop
set /a $transcheck=$transcheck+1
set $attempt=
call :token %$transcheck% $attempt=%$string%
if "%$attempt%"=="" goto :eof
call :set $attempt=%%interpret.lang.transterm[%$attempt%]%%
if not "%$attempt%"=="" goto :eof
goto :interpret.getobject.transloop
:type.giveproperty
for /f "tokens=1,2*" %%f in ("%*") do (set $type=%%f
set $property=%%g
set $list=%%h
)
call :set $type=%%interpret.type[%$type%]%%
call :set $props=%%type[%$type%].properties%%
set /a $props=$props+1
set type[%$type%].properties=%$props%
set debug.type[%$type%].property[%$property%]=%$props%
set debug.type[%$type%].property[%$props%].name=%$property%
set $value=
:type.giveproperty.adjloop
for /f "tokens=1* delims=, " %%f in ("%$list%") do (
set $adj=%%f
set $list=%%g
)
set /a $value=$value+1
set interpret.adjective[%$adj%].type[%$type%]=%$value%
set interpret.adjective[%$adj%].type[%$type%].property=%$props%
set console.type[%$type%].property[%$props%].adjective[%$value%]=%$adj%
if not "%$list%"=="" goto :type.giveproperty.adjloop
set type[%$type%].property[%$props%].highest=%$value%
goto :eof
:type.givestate
for /f "tokens=1,2,3,4" %%f in ("%*") do (set $type=%%f
set $state=%%g
set $zero=%%h
set $one=%%i
)
call :set $type=%%interpret.type[%$type%]%%
call :set $states=%%type[%$type%].states%%
set /a $states=$states+1
set type[%$type%].states=%$states%
set debug.type[%$type%].state[%$state%]=%$states%
set debug.type[%$type%].state[%$states%].name=%$state%
set interpret.adjective[%$zero%].type[%$type%]=0
set interpret.adjective[%$zero%].type[%$type%].state=%$states%
set console.type[%$type%].state[%$states%].adjective[0]=%$zero%
set interpret.adjective[%$one%].type[%$type%]=1
set interpret.adjective[%$one%].type[%$type%].state=%$states%
set console.type[%$type%].state[%$states%].adjective[1]=%$one%
goto :eof
:type.givevalue
for /f "tokens=1,2*" %%f in ("%*") do (set $type=%%f
set $value=%%g
)
call :set $type=%%interpret.type[%$type%]%%
call :set $values=%%type[%$type%].values%%
set /a $values=$values+1
set type[%$type%].values=%$values%
set debug.type[%$type%].value[%$value%]=%$values%
set debug.type[%$type%].value[%$values%].name=%$value%
set $value=
goto :eof
:type.givepointer
for /f "tokens=1,2*" %%f in ("%*") do (set $type=%%f
set $pointer=%%g
set $pointtype=%%h
)
call :set $type=%%interpret.type[%$type%]%%
call :set $pointid=%%interpret.type[%$pointtype%]%%
call :set $points=%%type[%$type%].pointers%%
set /a $points=$points+1
set type[%$type%].pointers=%$points%
set debug.type[%$type%].pointer[%$pointer%]=%$points%
set debug.type[%$type%].pointer[%$points%].name=%$pointer%
set type[%$type%].pointer[%$points%]=%$pointid%
goto :eof
:type.expand
set type[%2].super=%1
call :set type[%1].sub=%%type[%1].sub%%%2;
set $counter=
call :set $max=%%type[%1].properties%%
call :type.expand.property %*
set type[%2].properties=%$max%
set $counter=
call :set $max=%%type[%1].states%%
call :type.expand.state %*
set type[%2].states=%$max%
set $counter=
call :set $max=%%type[%1].values%%
call :type.expand.value %*
set type[%2].values=%$max%
set $counter=
call :set $max=%%type[%1].pointers%%
call :type.expand.pointer %*
set type[%2].pointers=%$max%
goto :eof
:type.expand.property
if "%$counter%"=="%$max%" goto :eof
set /a $counter=$counter+1
set $adjcounter=
call :set $adjmax=%%type[%1].property[%$counter%].highest%%
:type.expand.property.value
set /a $adjcounter=$adjcounter+1
call :set $term=%%console.type[%1].property[%$counter%].adjective[%$adjcounter%]%%
set interpret.adjective[%$term%].type[%2]=%$adjcounter%
set interpret.adjective[%$term%].type[%2].property=%$counter%
set console.type[%2].property[%$counter%].adjective[%$adjcounter%]=%$term%
if not "%$adjcounter%"=="%$adjmax%" goto :type.expand.property.value
set type[%2].property[%$counter%].highest=%$adjmax%
call :set $debug=%%debug.type[%1].property[%$counter%].name%%
set debug.type[%2].property[%$debug%]=%$counter%
set debug.type[%2].property[%$counter%].name=%$debug%
goto :type.expand.property
:type.expand.state
if "%$counter%"=="%$max%" goto :eof
set /a $counter=$counter+1
call :set $term=%%console.type[%1].state[%$counter%].adjective[0]%%
set interpret.adjective[%$term%].type[%2]=0
set interpret.adjective[%$term%].type[%2].state=%$counter%
set console.type[%2].state[%$counter%].adjective[0]=%$term%
call :set $term=%%console.type[%1].state[%$counter%].adjective[1]%%
set interpret.adjective[%$term%].type[%2]=1
set interpret.adjective[%$term%].type[%2].state=%$counter%
set console.type[%2].state[%$counter%].adjective[1]=%$term%
call :set $debug=%%debug.type[%1].state[%$counter%].name%%
set debug.type[%2].state[%$debug%]=%$counter%
set debug.type[%2].state[%$counter%].name=%$debug%
goto :type.expand.state
:type.expand.value
if "%$counter%"=="%$max%" goto :eof
set /a $counter=$counter+1
call :set $debug=%%debug.type[%1].value[%$counter%].name%%
set debug.type[%2].value[%$debug%]=%$counter%
set debug.type[%2].value[%$counter%].name=%$debug%
goto :type.expand.value
:type.expand.pointer
if "%$counter%"=="%$max%" goto :eof
set /a $counter=$counter+1
call :set $debug=%%debug.type[%1].pointer[%$counter%].name%%
set debug.type[%2].pointer[%$debug%]=%$counter%
set debug.type[%2].pointer[%$counter%].name=%$debug%
call :set type[%2].pointer[%$counter%]=%%type[%1].pointer[%$counter%]%%
goto :type.expand.pointer
:token
for /f "tokens=1*" %%f in ("%*") do (
set token.num=%%f
set token.remainder=%%g
)
for /f "tokens=1* delims==" %%f in ("%token.remainder%") do (
set token.var=%%f
set token.remainder=%%g
)
for /f "tokens=%token.num%" %%f in ("%token.remainder%") do (set %token.var%=%%f)
goto :eof
:random
for /f "tokens=1* delims==" %%f in ("%*") do (
set random.var=%%f
set random.max=%%g
)
for /f "tokens=1*" %%f in ("%random.max%") do (
set random.min=%%f
set random.max=%%g
)
set /a %random.var%=(random.max-random.min+1)*%random%/32768+random.min
set random.var=
set random.min=
set random.max=
goto :eof
:set
set %*
goto :eof
:pexit
if not "%*"=="" (echo %*)
echo Press any key to exit . . .
pause>nul
exit
rem ### File Reader ###
:readline
set steeze=%*
set steeze=%steeze:~1%
title %steeze%
set indent=0
call :readline.indent
if %indent% gtr %layer% goto :eof
if %indent% lss %layer% call :readline.lowerindent
goto :readline.seek[%purpose%]
:readline.indent
set bit=%steeze:~0,1%
if not "%bit%"==" " goto :eof
set /a indent=indent+1
set steeze=%steeze:~1%
goto :readline.indent
:readline.lowerindent
call :set last=%%layer[%layer%]%%
call :readline.close[%purpose%]
set /a layer=layer-1
if %indent% lss %layer% goto :readline.lowerindent
call :set purpose=%%purpose[%layer%]%%
goto :eof
:readline.seek[root]
for /f "tokens=1*" %%f in ("%steeze%") do (set name=%%f
set steeze=%%g)
set purpose[0]=root
if "%name%"=="type" (goto :readline.open[typedata])
if "%name%"=="event" (goto :readline.open[eventdata])
if "%name%"=="reality" (set place=%steeze%
set purpose=reality
set purpose[0]=reality
goto :eof)
call :pexit How does do %steeze%?
:readline.open[typedata]
set /a layer=layer+1
set layer[%layer%]=%steeze%
set super=%this%
set this=%steeze%
if "%super%"=="" (set super=nul)
call :set superid=%%interpret.type[%super%]%%
set /a dream.environment.types=dream.environment.types+1
set thisid=%dream.environment.types%
set interpret.type[%this%]=%thisid%
set console.type[%thisid%]=%this%
call :type.expand %superid% %thisid%
set safe=true
set purpose=typedata
set purpose[%layer%]=typedata
goto :eof
:readline.seek[typedata]
for /f "tokens=1*" %%f in ("%steeze%") do (set token=%%f
set steeze=%%g)
if "%token%"=="property" (call :type.giveproperty %this% %steeze%
goto :eof)
if "%token%"=="state" (call :type.givestate %this% %steeze%
goto :eof)
if "%token%"=="value" (call :type.givevalue %this% %steeze%
goto :eof)
if "%token%"=="pointer" (call :type.givepointer %this% %steeze%
goto :eof)
if "%token%"=="type" (goto :readline.open[typedata])
call :pexit What's a %token%?
:readline.close[typedata]
set safe=
set this=%super%
set thisid=%superid%
call :set superid=%%type[%thisid%].super%%
call :set super=%%console.type[%superid%]%%
goto :eof
:readline.open[eventdata]
for /f "tokens=1,2,3,4" %%a in ("%steeze%") do (
set name=%%a
set subject=%%b
set object=%%c
set instrument=%%d)
set layer=1
set layer[1]=
set /a dream.environment.events=dream.environment.events+1
set name[0]=%steeze%
set this=%steeze%
set purpose=eventdata
set purpose[1]=eventdata
set part[subject]=0
set part[object]=1
call :set type[0]=%%interpret.type[%subject%]%%
call :set type[1]=%%interpret.type[%object%]%%
set event[%dream.environment.events%].subject=%type[0]%
set event[%dream.environment.events%].object=%type[1]%
if not "%instrument%"=="" (
call :set type[2]=%%interpret.type[%instrument%]%%
set part[instrument]=2
set event[%dream.environment.events%].instrument=%type[2]%
)
set debug.event[%name%]=%dream.environment.events%
goto :eof
:readline.seek[eventdata]
for /f "tokens=1*" %%f in ("%steeze%") do (set token=%%f
set steeze=%%g)
if "%token%"=="if" (goto :readline.event.if)
if "%token%"=="destroy" (goto :readline.event.destroy)
rem if "%token%"=="make" (goto :readline.event.make)
if "%token%"=="print" (goto :readline.event.print)
if "%token%"=="define" (goto :readline.event.set.basic)
if "%token%"=="align" (goto :readline.event.set.dynamic)
if "%token%"=="set" (set op==
goto :readline.event.set.value)
if "%token%"=="increase" (set op=+
goto :readline.event.set.value)
if "%token%"=="decrease" (set op=-
goto :readline.event.set.value)
if "%token%"=="else" (if "%else%"=="true" (
set code=%code%{
set /a layer=layer+1
call :set layer[%%layer%%]=else
call :set purpose[%%layer%%]=eventdata
goto :eof
))
call :pexit How does expect %token%?
:readline.close[eventdata]
if not "%last%"=="" (
set code=%code%}
if "%last%"=="if" (set else=true) else (set else=)
goto :eof)
set event[%dream.environment.events%]=%code%
set code=
set event.outputcounter=
goto :eof
:readline.event.if
set code=%code%?
for /f "tokens=1-2,3*" %%a in ("%steeze%") do (
if "%%b"=="not" (
set useop=~
set steeze=%%a %%c
) else (
set useop==
)
)
for /f "tokens=1,2,3*" %%h in ("%steeze%") do (
set lhs=%%h
set compareop=%%i
set rhs=%%j
set junk=%%k
)
set /a layer=layer+1
set layer[%layer%]=if
set purpose[%layer%]=eventdata
if "%compareop%"=="mirrors" goto :readline.event.if.dynamic
if "%compareop%"=="equals" goto :readline.event.if.direct
call :readline.event.giveterm %lhs% %rhs%
if "%compareop%"=="is" (set code=%code%=) else (
call :pexit Which way is %compareop%?
)
call :readline.event.closeterm
set code=%code%{
goto :eof
:readline.event.if.dynamic
call :readline.event.giveterm %lhs%
set code=%code%%useop%
call :readline.event.giveterm %rhs%
set code=%code%{
goto :eof
:readline.event.if.direct
call :readline.event.giveterm %lhs%
set code=%code%%useop%#%rhs%{
goto :eof
:readline.event.destroy
set code=%code%~
for /f "tokens=1,2" %%f in ("%steeze%") do (
set part=%%f
set discard=%%g
)
if not "%discard%"=="" (
call :pexit Kill a %part% what?
)
if "%part%"=="object" (set code=%code%1) else (
if "%part%"=="instrument" (set code=%code%2) else (
call :pexit Which one is the %part%?
)
)
set code=%code%;
goto :eof
:readline.event.print
set /a event.outputcounter=event.outputcounter+1
set event[%dream.environment.events%].output[%event.outputcounter%]=%steeze%
set code=%code%:%event.outputcounter%;
goto :eof
:readline.event.set.basic
set code=%code%!
for /f "tokens=1,2,3*" %%a in ("%steeze%") do (
set left=%%a
if "%%b"=="as" (set right=%%c) else (set right=%%b)
)
call :readline.event.giveterm %left% %right%
set code=%code%=
call :readline.event.closeterm
set code=%code%;
goto :eof
:readline.event.set.dynamic
set code=%code%!
for /f "tokens=1,2,3*" %%a in ("%steeze%") do (
set left=%%a
if "%%b"=="with" (set right=%%c) else (set right=%%b)
)
call :readline.event.giveterm %left%
set code=%code%=
call :readline.event.giveterm %right%set code=%code%;
goto :eof
:readline.event.set.value
set code=%code%!
if "%op%"=="=" (set read=to) else (set read=by)
for /f "tokens=1,2,3*" %%a in ("%steeze%") do (
set left=%%a
if "%%b"=="%read%" (set right=%%c) else (set right=%%b)
)
call :readline.event.giveterm %left%
set code=%code%%op%#%right%
set code=%code%;
goto :eof
:readline.event.giveterm
for /f "tokens=1* delims=." %%f in ("%1") do (
set partname=%%f
set array=%%g
)
set code=%code%@
call :readline.event.givepart %partname%
call :set cid=%%type[%part%]%%
call :readline.event.giveterm.pointloop %2
if "%2"=="" (goto :eof)
call :set property=%%interpret.adjective[%2].type[%cid%].property%%
if not "%property%"=="" (set code=%code%.$%property%
call :set property=%%interpret.adjective[%2].type[%cid%]%%
goto :eof
)
call :set property=%%interpret.adjective[%2].type[%cid%].state%%
if not "%property%"=="" (set code=%code%.$%property%
call :set property=%%interpret.adjective[%2].type[%cid%]%%
goto :eof
)
call :pexit What's a %2?
:readline.event.giveterm.pointloop
if "%array%"=="" goto :eof
for /f "tokens=1* delims=." %%f in ("%array%") do (
set pointname=%%f
set array=%%g
)
if "%array%"=="" if "%1"=="" (goto :readline.event.giveterm.pointloop.test)
call :set pointid=%%debug.type[%cid%].pointer[%pointname%]%%
call :set cid=%%type[%cid%].pointer[%pointid%]%%
set code=%code%.%pointid%
goto :readline.event.giveterm.pointloop
:readline.event.giveterm.pointloop.test
if "%pointname%"=="type" (set value=%cid%
set code=%code%.*
)
call :readline.event.giveterm.pointloop.testvalue $ property
if not "%value%"=="" goto :eof
call :readline.event.giveterm.pointloop.testvalue ! state
if not "%value%"=="" goto :eof
call :readline.event.giveterm.pointloop.testvalue # value
if not "%value%"=="" goto :eof
call :set code=%code%.%%debug.type[%cid%].pointer[%pointname%]%%.@
goto :eof
:readline.event.giveterm.pointloop.testvalue
call :set value=%%debug.type[%cid%].%2[%pointname%]%%
if "%value%"=="" (goto :eof)
set code=%code%.%1%value%
goto :eof
:readline.event.closeterm
set code=%code%#%property%
goto :eof
:readline.event.givepart
call :set part=%%part[%*]%%
if "%part%"=="" (call :pexit Which one is a %*?)
set code=%code%%part%
goto :eof
:readline.seek[reality]
for /f "tokens=1*" %%f in ("%steeze%") do (set type=%%f
set debug=%%g
)
if "%type%"=="controlhook" (
call :set hook.controlgroup=%%debug.object[%debug%]%%
set purpose=hook
goto :eof)
call :set id=%%interpret.type[%type%]%%
if "%id%"=="" (call :pexit what's a %type%?)
set purpose=defineobject
set /a dream.environment.objects=dream.environment.objects+1
set object[%dream.environment.objects%]=%id%
set debug.object[%debug%]=%dream.environment.objects%
set /a layer=layer+1
set purpose[%layer%]=defineobject
goto :eof
:readline.close[defineobject]
goto :eof
:readline.seek[defineobject]
for /f "tokens=1*" %%f in ("%steeze%") do (set head=%%f
set foot=%%g)
set dtype=value
call :set slot=%%debug.type[%id%].value[%head%]%%
set data=%foot%
if not "%slot%"=="" goto :readline.defineobject
set dtype=pointer
call :set slot=%%debug.type[%id%].pointer[%head%]%%
call :set data=%%debug.object[%foot%]%%
if not "%slot%"=="" (if "%data%"=="" (call :pexit What %foot%?) else (goto :readline.defineobject))
call :set data=%%interpret.adjective[%head%].type[%id%]%%
set dtype=state
call :set slot=%%interpret.adjective[%head%].type[%id%].state%%
if not "%slot%"=="" goto :readline.defineobject
set dtype=property
call :set slot=%%interpret.adjective[%head%].type[%id%].property%%
if not "%slot%"=="" goto :readline.defineobject
call :pexit What kind of thing is %head%?
:readline.defineobject
if "%dtype%"=="pointer" call :readline.defineobject.test
set object[%dream.environment.objects%].%dtype%[%slot%]=%data%
goto :eof
:readline.defineobject.test
call :set test=%%object[%data%]%%
call :set right=%%type[%id%].pointer[%slot%]%%
:readline.defineobject.test.loop
if "%test%"=="%right%" goto :eof
call :set test=%%type[%test%].super%%
if "%test%"=="0" (call :pexit What kind of %right% is a %%object[%data%]%%?
goto :readline.defineobject.test.loop
:readline.close[hook]
goto :eof
:readline.seek[hook]
for /f "tokens=1*" %%f in ("%steeze%") do (
set verb=%%f
set eventname=%%g
)
call :set event=%%debug.event[%eventname%]%%
if "%event%"=="" (call :pexit How do I %eventname%?)
call :set action=%%interpret.hook.action[%verb%]%%
if "%action%"=="" (set /a hook.actions=hook.actions+1
call :set action=%%hook.actions%%)
set interpret.hook.action[%verb%]=%action%
call :set ob=%%event[%event%].object%%
call :set in=%%event[%event%].instrument%%
if "%in%"=="" (call :readline.seek.hook.ob
goto :eof)
call :readline.seek.hook.in
call :readline.seek.hook.ob
set in.touse=
goto :eof
:readline.seek.hook.ob.mark
if "%ob.tosub%"=="" goto :eof
for /f "tokens=1* delims=;" %%f in ("%ob.tosub%") do (set ob=%%f
set ob.tosub=%%g
)
:readline.seek.hook.ob
call :readline.seek.hook.roll
call :set ob.sub=%%type[%ob%].sub%%
set ob.tosub=%ob.tosub%%ob.sub%
goto :readline.seek.hook.ob.mark
:readline.seek.hook.in.mark
if "%in.tosub%"=="" goto :eof
for /f "tokens=1* delims=;" %%f in ("%in.tosub%") do (set in=%%f
set in.tosub=%%g
)
:readline.seek.hook.in
call :set in.sub=%%type[%in%].sub%%
set in.tosub=%in.tosub%%in.sub%
set in.touse=%in.touse%%in.sub%
goto :readline.seek.hook.in.mark
:readline.seek.hook.roll
if "%in.touse%"=="" (set hook.action[%action%].using[%ob%.]=%event%
goto :eof)
set touse=%in.touse%
:readline.seek.hook.rolling
for /f "tokens=1* delims=;" %%f in ("%touse%") do (set in=%%f
set touse=%%g
)
set hook.action[%action%].using[%ob%,%in%]=%event%
if "%touse%"=="" goto :eof
goto :readline.seek.hook.rolling
@Echo off
rem RPS by ChaviusMiller
rem this is the Title line
title RPS
rem this line defines user/AI information
set UC=
set AIC=
set User=
set TW=0
set TL=0
rem "UC" is user choice "AIC" is AI choice "User" username "TW" times won "TL" times lost
set /p User=Username=
rem above line prompts for what to specific value "User" as
:main
rem above line specifies the beggining of the part of the script that will be recalled
cls
echo.Welcome %User%
echo.
echo.This is Rock Paper Scissors(RPS).
echo.
echo.Please choose a stance R=rock P=paper S=scissors
echo.
echo.Computer %TL% %User% %TW%
set /p UC=RPS!:
if /i "%UC%"=="debug" goto debug
if /i "%UC%"=="r" goto rock
if /i "%UC%"=="p" goto paper
if /i "%UC%"=="s" goto scissor
if /i "%UC%"=="%UC%" goto main
rem above lines filter "UC" for its choices
rem last line for "if /i "US"=="%UC%" goto main" says if none of the above options are not chosen then by default it goes back to the beggining
:rock
rem below sets Aic to equal a random number between 1-3
set UC=1
set /a AIC=%random% %%3 + 1
goto calculateR
:paper
set UC=2
set /a AIC=%random% %%3 + 1
goto calculateP
:scissor
set UC=3
set /a AIC=%random% %%3 + 1
goto calculateS
:calculateR
if "%AIC%"=="1" goto tie
if "%AIC%"=="2" goto loss
if "%AIC%"=="3" goto win
:calculateP
if "%AIC%"=="1" goto win
if "%AIC%"=="2" goto tie
if "%AIC%"=="3" goto loss
:calculateS
if "%AIC%"=="1" goto loss
if "%AIC%"=="2" goto win
if "%AIC%"=="3" goto tie
:loss
set /a TL=%TL%+1
Echo.Sorry you loose!
echo.
echo.Computer %TL% %User% %TW%
pause
goto main
:win
set /a TW=%TW%+1
echo.You win!
echo.
echo.Computer %TL% %User% %TW%
pause
goto main
:tie
echo.You tied!
echo.
echo.Computer %TL% %User% %TW%
pause
goto main
:debug
set /a AIC=%random% %%3 + 1
echo.%AIC%
goto debug
Also this may be my best yet.
Wondering what to do now that RPS is understood ???
@echo off
setlocal EnableDelayedExpansion
title Turret Defense
echo Installing. . .
if not exist def_bin md def_bin
cd def_bin
if not exist path for %%A in (-2.4\1 -1.4\2 1.4\3 2.4\4 3.4\5 4.4\6 4.3\7 4.2\8 4.1\9 5.1\10 6.1\11 7.1\12 8.1\13 8.2\14 8.3\15 8.4\16 8.5\17 8.6\18 9.6\19 10.6\20 11.6\21 12.6\22 13.6\23 14.6\24 14.5\25 14.4\26 15.4\27 16.4\28 17.4\29 18.4\30 18.3\31 19.3\32 20.3\33 20.4\34 20.5\35 21.5\36 22.5\37 23.5\38 23.4\39 24.4\40 25.4\41 26.4\42) do echo %%A >>path
cls
set range=10
set turn=1
set life=9
set error=
set wave.size=5
set wave.spacing=3
set turn.delay=1
set color.flash=6
set color.norm=7
set hp.multip=2
set turret.cost=30
set /a gold.plus=%turret.cost%/2
call :new_game
:loop
call :turn
:end_turn
call :wave
:end_wave
set /a turn+=1
goto :loop
:new_game
for /f "delims=" %%A in ('dir turret* /b') do del /f %%A
for /l %%Y in (1,1,7) do (
for /l %%X in (1,2,26) do (
set "cord.%%X.%%Y=."
)
for /l %%X in (0,2,26) do (
set "cord.%%X.%%Y= "
)
)
for %%A in (1.4 2.4 3.4 4.4 4.3 4.2 4.1 5.1 6.1 7.1 8.1 8.2 8.3 8.4 8.5 8.6 9.6 10.6 11.6 12.6 13.6 14.6 14.5 14.4 15.4 16.4 17.4 18.4 18.3 19.3 20.3 20.4 20.5 21.5 22.5 23.5 23.4 24.4 25.4 26.4) do set "cord.%%A="
for /l %%P in (1,1,42) do set "path.%%P=0"
set gold=30
set turret=1
goto :eof
:map
REM pause
cls
:load_map
if "%life:~2,1%"=="" (
if not "%life:~1,1%"=="" (
set "life.backSpace="
set "life.backSpace2=."
) else (
set "life.backSpace=."
set "life.backSpace2=."
)
) else (
set "life.backspace2="
set "life.backspace="
)
set "lin.01= A B C D E F G H I J K L M"
set "lin.02=# . . . . . . . . . . . . . #%turn%"
set "lin.03=###############################"
set "lin.1=# %cord.1.1%%cord.2.1%%cord.3.1%%path.9%%path.10%%path.11%%path.12%%path.13%%cord.9.1%%cord.10.1%%cord.11.1%%cord.12.1%%cord.13.1%%cord.14.1%%cord.15.1%%cord.16.1%%cord.17.1%%cord.18.1%%cord.19.1%%cord.20.1%%cord.21.1%%cord.22.1%%cord.23.1%%cord.24.1%%cord.25.1%%cord.26.1%#..1"
set "lin.2=# %cord.1.2%%cord.2.2%%cord.3.2%%path.8%%cord.5.2%%cord.6.2%%cord.7.2%%path.14%%cord.9.2%%cord.10.2%%cord.11.2%%cord.12.2%%cord.13.2%%cord.14.2%%cord.15.2%%cord.16.2%%cord.17.2%%cord.18.2%%cord.19.2%%cord.20.2%%cord.21.2%%cord.22.2%%cord.23.2%%cord.24.2%%cord.25.2%%cord.26.1%#..2"
set "lin.3=# %cord.1.3%%cord.2.3%%cord.3.3%%path.7%%cord.5.3%%cord.6.3%%cord.7.3%%path.15%%cord.9.3%%cord.10.2%%cord.11.3%%cord.12.2%%cord.13.3%%cord.14.3%%cord.15.3%%cord.16.3%%cord.17.3%%path.31%%path.32%%path.33%%cord.21.3%%cord.22.3%%cord.23.3%%cord.24.3%%cord.25.3%%cord.26.3%#..3"
set "lin.4=%path.1%%path.2%%path.3%%path.4%%path.5%%path.6%%cord.5.4%%cord.6.4%%cord.7.4%%path.16%%cord.9.4%%cord.10.4%%cord.11.4%%cord.12.4%%cord.13.4%%path.26%%path.27%%path.28%%path.29%%path.30%%cord.19.4%%path.34%%cord.21.4%%cord.22.4%%path.39%%path.40%%path.41%%path.42%%life%%life.backSpace%%life.backSpace2%4"
set "lin.5=# %cord.1.5%%cord.2.5%%cord.3.5%%cord.4.5%%cord.5.5%%cord.6.5%%cord.7.5%%path.17%%cord.9.5%%cord.10.5%%cord.11.5%%cord.12.5%%cord.13.5%%path.25%%cord.15.5%%cord.16.5%%cord.17.5%%cord.18.5%%cord.19.5%%path.35%%path.36%%path.37%%path.38%%cord.24.5%%cord.25.5%%cord.26.5%#..5"
set "lin.6=# %cord.1.6%%cord.2.6%%cord.3.6%%cord.4.6%%cord.5.6%%cord.6.6%%cord.7.6%%path.18%%path.19%%path.20%%path.21%%path.22%%path.23%%path.24%%cord.15.6%%cord.16.6%%cord.17.6%%cord.18.6%%cord.19.6%%cord.20.6%%cord.21.6%%cord.22.6%%cord.23.6%%cord.24.6%%cord.25.6%%cord.26.6%#..6"
set "lin.7=# %cord.1.7%%cord.2.7%%cord.3.7%%cord.4.7%%cord.5.7%%cord.6.7%%cord.7.7%%cord.8.7%%cord.9.7%%cord.10.7%%cord.11.7%%cord.12.7%%cord.13.7%%cord.14.7%%cord.15.7%%cord.16.7%%cord.17.7%%cord.18.7%%cord.19.7%%cord.20.7%%cord.21.7%%cord.22.7%%cord.23.7%%cord.24.7%%cord.25.7%%cord.26.7%#..7"
set "lin.8=################################"
:draw_map
echo %lin.01%
echo %lin.02%
echo %lin.03%
echo %lin.1%
echo %lin.2%
echo %lin.3%
echo %lin.4%
echo %lin.5%
echo %lin.6%
echo %lin.7%
echo %lin.8%
goto :eof
:turn
call :map
echo Gold: %gold%g
echo.%error%
echo.
echo. buy ^<X.Y^> %turret.cost%g Buys a turret and installs it to (X,Y).
echo. sell ^<X.Y^> %gold.plus%g Sells the turret at (X,Y).
echo. pass Ends the buying/selling phase.
set /p cmd=^>
echo. Processing Command. Please wait. . .
for /f "delims= " %%A in ("%cmd%") do call :%%A
goto :turn
:buy
set /a gold-=%turret.cost%
if %gold% LSS 0 (
set /a gold+=%turret.cost%
) else (
for /f "tokens=2 delims= " %%S in ("%cmd%") do (
for /f "tokens=1,2 delims=." %%A in ("%%S") do (
if /i "%%A"=="a" set A=1
if /i "%%A"=="b" set A=3
if /i "%%A"=="c" set A=5
if /i "%%A"=="d" set A=7
if /i "%%A"=="e" set A=9
if /i "%%A"=="f" set A=11
if /i "%%A"=="g" set A=13
if /i "%%A"=="h" set A=15
if /i "%%A"=="i" set A=17
if /i "%%A"=="j" set A=19
if /i "%%A"=="k" set A=21
if /i "%%A"=="l" set A=23
if /i "%%A"=="m" set A=25
if defined cord.!A!.%%B set cord.!A!.%%B=T
if "%%B"=="" (
set /a gold+=%turret.cost%
set error=Wrong Syntax
goto :eof
)
if "!A!"=="" (
set /a gold+=%turret.cost%
set error=Wrong Syntax
goto :eof
)
echo !A!.%%B >turret%turret%
call :Func_TurretRange !A! %%B
set /a turret+=1
)
)
)
set error=
goto :eof
:sell
for /f "tokens=2 delims= " %%S in ("%cmd%") do (
for /f "tokens=1,2 delims=." %%A in ("%%S") do (
if /i "%%A"=="a" set A=1
if /i "%%A"=="b" set A=3
if /i "%%A"=="c" set A=5
if /i "%%A"=="d" set A=7
if /i "%%A"=="e" set A=9
if /i "%%A"=="f" set A=11
if /i "%%A"=="g" set A=13
if /i "%%A"=="h" set A=15
if /i "%%A"=="i" set A=17
if /i "%%A"=="j" set A=19
if /i "%%A"=="k" set A=21
if /i "%%A"=="l" set A=23
if /i "%%A"=="m" set A=25
set sell=0
for /f "delims=" %%G in ('dir turret* /b') do (
set /p loc=<%%G
if "!loc!"=="!A!.%%B " (
del /f %%G
set /a gold+=!gold.plus!
set "cord.!A!.%%B=."
set sell=1
)
REM echo "!loc!"=="!A!.%%B"
)
)
)
if "%sell%"=="0" set error=No Turret Exists There.
goto :eof
:pass
goto :end_turn
:wave
:wave.setup
for /l %%A in (1,1,%wave.size%) do (
set /a creap%%A.hp=%turn%*%hp.multip%
if !creap%%A.hp! GTR 9 (
set creap%%A.sym=+
) else (
set creap%%A.sym=!creap%%A.hp!
)
set /a creap%%A.pos=%%A-%wave.size%
set /a creap%%A.pos*=%wave.spacing%
)
:wave.start
REM Define Creap HP
for /f "tokens=1 delims==" %%A in ('set creap ^| find ".sym"') do (
for /f "tokens=1 delims=." %%B in ("%%A") do (
for /f "tokens=2 delims=p" %%C in ("%%B") do (
if !creap%%C.hp! GTR 9 (
set creap%%C.sym=+
) else (
set creap%%C.sym=!creap%%C.hp!
) 2>nul
) 2>nul
) 2>nul
) 2>nul
REM Move creaps
for /f "tokens=1,2 delims==" %%A in ('set creap ^| find ".pos"') do (
set /a %%A=%%B+1
REM echo set /a %%A=%%B+1
for /f "tokens=2 delims=." %%G in ("%%A") do (
if %%B EQU 42 (
for /f "tokens=1 delims=." %%I in ("%%A") do (
for /f "tokens=2 delims=p" %%H in ("%%I") do (
set /a life-=!creap%%H.hp!
set creap%%H.hp=
set creap%%H.pos=
set creap%%H.sym=
) 2>nul
) 2>nul
) 2>nul
) 2>nul
) 2>nul
REM Kill Creaps
for /l %%A in (1,1,%wave.size%) do (
if "!creap%%A.hp!"=="0" (
set creap%%A.hp=
set creap%%A.pos=
set creap%%A.sym=
set /a gold.gain=%turn%/5
set /a gold+=%gold.gain%
) 2>nul
) 2>nul
REM Define new path variables
for /l %%A in (0,1,42) do set path.%%A=0
for /f "tokens=1,2 delims==" %%H in ('set creap ^| find ".pos"') do (
for /f "tokens=1 delims=." %%A in ("%%H") do (
for /f "tokens=2 delims=p" %%B in ("%%A") do (
set path.%%I=!creap%%B.sym!
) 2>nul
) 2>nul
) 2>nul
call :map
REM Fire Turrets
for /f "delims=" %%T in ('dir turret* /b') do (
for /f "skip=1" %%N in (%%T) do (
if not "!path%%N!"=="0" (
for /f "tokens=1,2 delims==" %%C in ('set creap ^| find ".pos"') do (
if "%%D"=="%%N" (
for /f "tokens=1 delims=." %%X in ("%%C") do (
for /f "tokens=2 delims=p" %%Z in ("%%X") do (
set /a creap%%Z.hp-=1
color 0%color.flash%
set flash=1
) 2>nul
) 2>nul
) 2>nul
if "!flash!"=="1" (
ping localhost -n 1 >nul 2>&1
ping localhost -n 1 >nul 2>&1
:: ping localhost -n 1 >nul 2>&1
color 0%color.norm%
call :map
set flash=0
) 2>nul
) 2>nul
) 2>nul
) 2>nul
) 2>nul
if %life% LEQ 0 goto :endgame
ping localhost -n %turn.delay% >nul
set creap>nul 2>&1 || (
set /a life.gain=%turn%/5
set /a life+=!life.gain!
goto :end_wave
)
goto :wave.start
:endgame
set "life=0"
call :map
echo.
echo You lose on turn %turn%.
pause>nul
exit
:Func_TurretRange
set startx=%1
set starty=%2
for /l %%A in (0,1,30) do (
for /l %%B in (0,1,10) do (
call :Func_TurretRange.check %%A %%B
)
)
set startx=
set starty=
goto :eof
:Func_TurretRange.check
set /a workingx=%startx%-%1
set /a workingy=%starty%-%2
if %workingx% LSS 0 set workingx=%workingx:~1%
if %workingy% LSS 0 set workingy=%workingy:~1%
set /a working=%workingx%+%workingy%
REM if %working% LSS %range% if %working% GTR 0 echo %1.%2 >>turret%turret%
if %working% LSS %range% if %working% GTR 0 for /f "tokens=1,2 delims=\" %%H in (path) do if /i "%1.%2"=="%%H" echo %%I >>turret%turret%
set working=
set workingx=
set workingy=
goto :eof
I wrote a simple Tower Defense game.
title Turret Defense
Don't pass on your first move. :DI laughed so hard that I almost fell out of my chair.
0 = Path the creeps take
. = Possible place to put a turret
If everything is working as it should, the screen should flash yellow every time a turret fires.
@echo off
setlocal EnableDelayedExpansion
title Turret Defense
echo Installing. . .
if not exist def_bin md def_bin
cd def_bin
if not exist path for %%A in (-2.4\1 -1.4\2 1.4\3 2.4\4 3.4\5 4.4\6 4.3\7 4.2\8 4.1\9 5.1\10 6.1\11 7.1\12 8.1\13 8.2\14 8.3\15 8.4\16 8.5\17 8.6\18 9.6\19 10.6\20 11.6\21 12.6\22 13.6\23 14.6\24 14.5\25 14.4\26 15.4\27 16.4\28 17.4\29 18.4\30 18.3\31 19.3\32 20.3\33 20.4\34 20.5\35 21.5\36 22.5\37 23.5\38 23.4\39 24.4\40 25.4\41 26.4\42) do echo %%A >>path
cls
set color.flash=6
set color.norm=7
set error=
set gold.divis=2
set gold.start=25
set hp.multip=1
set life=9
set live.divisor=5
set range=5
set turret.cost=15
set turn=1
set turn.delay=1
set wave.size=5
set wave.spacing=3
set /a gold.plus=%turret.cost%/2
set "spinner.1=|"
set "spinner.2=|"
set "spinner.3=/"
set "spinner.4=/"
set "spinner.5=-"
set "spinner.6=-"
set "spinner.7=\"
set "spinner.8=\"
call :new_game
:loop
call :turn
:end_turn
call :wave
:end_wave
set /a turn+=1
goto :loop
:new_game
for /f "delims=" %%A in ('dir turret* /b') do del /f %%A
for /l %%Y in (1,1,7) do (
for /l %%X in (1,2,26) do (
set "cord.%%X.%%Y=."
)
for /l %%X in (0,2,26) do (
set "cord.%%X.%%Y= "
)
)
for %%A in (1.4 2.4 3.4 4.4 4.3 4.2 4.1 5.1 6.1 7.1 8.1 8.2 8.3 8.4 8.5 8.6 9.6 10.6 11.6 12.6 13.6 14.6 14.5 14.4 15.4 16.4 17.4 18.4 18.3 19.3 20.3 20.4 20.5 21.5 22.5 23.5 23.4 24.4 25.4 26.4) do set "cord.%%A="
for /l %%P in (1,1,42) do set "path.%%P=0"
echo. > turret0
set gold=%gold.start%
set turret=1
goto :eof
:map
REM pause
title Tower Defense
cls
:load_map
if "%life:~2,1%"=="" (
if not "%life:~1,1%"=="" (
set "life.backSpace="
set "life.backSpace2=."
) else (
set "life.backSpace=."
set "life.backSpace2=."
)
) else (
set "life.backspace2="
set "life.backspace="
)
set "lin.01= A B C D E F G H I J K L M"
set "lin.02=# . . . . . . . . . . . . . #%turn%"
set "lin.03=###############################"
set "lin.1=# %cord.1.1%%cord.2.1%%cord.3.1%%path.9%%path.10%%path.11%%path.12%%path.13%%cord.9.1%%cord.10.1%%cord.11.1%%cord.12.1%%cord.13.1%%cord.14.1%%cord.15.1%%cord.16.1%%cord.17.1%%cord.18.1%%cord.19.1%%cord.20.1%%cord.21.1%%cord.22.1%%cord.23.1%%cord.24.1%%cord.25.1%%cord.26.1%#..1"
set "lin.2=# %cord.1.2%%cord.2.2%%cord.3.2%%path.8%%cord.5.2%%cord.6.2%%cord.7.2%%path.14%%cord.9.2%%cord.10.2%%cord.11.2%%cord.12.2%%cord.13.2%%cord.14.2%%cord.15.2%%cord.16.2%%cord.17.2%%cord.18.2%%cord.19.2%%cord.20.2%%cord.21.2%%cord.22.2%%cord.23.2%%cord.24.2%%cord.25.2%%cord.26.1%#..2"
set "lin.3=# %cord.1.3%%cord.2.3%%cord.3.3%%path.7%%cord.5.3%%cord.6.3%%cord.7.3%%path.15%%cord.9.3%%cord.10.2%%cord.11.3%%cord.12.2%%cord.13.3%%cord.14.3%%cord.15.3%%cord.16.3%%cord.17.3%%path.31%%path.32%%path.33%%cord.21.3%%cord.22.3%%cord.23.3%%cord.24.3%%cord.25.3%%cord.26.3%#..3"
set "lin.4=%path.1%%path.2%%path.3%%path.4%%path.5%%path.6%%cord.5.4%%cord.6.4%%cord.7.4%%path.16%%cord.9.4%%cord.10.4%%cord.11.4%%cord.12.4%%cord.13.4%%path.26%%path.27%%path.28%%path.29%%path.30%%cord.19.4%%path.34%%cord.21.4%%cord.22.4%%path.39%%path.40%%path.41%%path.42%%life%%life.backSpace%%life.backSpace2%4"
set "lin.5=# %cord.1.5%%cord.2.5%%cord.3.5%%cord.4.5%%cord.5.5%%cord.6.5%%cord.7.5%%path.17%%cord.9.5%%cord.10.5%%cord.11.5%%cord.12.5%%cord.13.5%%path.25%%cord.15.5%%cord.16.5%%cord.17.5%%cord.18.5%%cord.19.5%%path.35%%path.36%%path.37%%path.38%%cord.24.5%%cord.25.5%%cord.26.5%#..5"
set "lin.6=# %cord.1.6%%cord.2.6%%cord.3.6%%cord.4.6%%cord.5.6%%cord.6.6%%cord.7.6%%path.18%%path.19%%path.20%%path.21%%path.22%%path.23%%path.24%%cord.15.6%%cord.16.6%%cord.17.6%%cord.18.6%%cord.19.6%%cord.20.6%%cord.21.6%%cord.22.6%%cord.23.6%%cord.24.6%%cord.25.6%%cord.26.6%#..6"
set "lin.7=# %cord.1.7%%cord.2.7%%cord.3.7%%cord.4.7%%cord.5.7%%cord.6.7%%cord.7.7%%cord.8.7%%cord.9.7%%cord.10.7%%cord.11.7%%cord.12.7%%cord.13.7%%cord.14.7%%cord.15.7%%cord.16.7%%cord.17.7%%cord.18.7%%cord.19.7%%cord.20.7%%cord.21.7%%cord.22.7%%cord.23.7%%cord.24.7%%cord.25.7%%cord.26.7%#..7"
set "lin.8=################################"
:draw_map
echo.
echo.
echo. %lin.01%
echo. %lin.02%
echo. %lin.03%
echo. %lin.1%
echo. %lin.2%
echo. %lin.3%
echo. %lin.4%
echo. %lin.5%
echo. %lin.6%
echo. %lin.7%
echo. %lin.8%
goto :eof
:turn
call :map
echo Gold: %gold%g
echo.%error%
echo.
echo. buy ^<X.Y^> %turret.cost%g Buys a turret and installs it to (X,Y).
echo. sell ^<X.Y^> %gold.plus%g Sells the turret at (X,Y).
echo. pass Ends the buying/selling phase.
set /p cmd=^>
echo. Processing Command. Please wait. . .
for /f "delims= " %%A in ("%cmd%") do call :%%A
goto :turn
:buy
set /a gold-=%turret.cost%
if %gold% LSS 0 (
set /a gold+=%turret.cost%
) else (
for /f "tokens=2 delims= " %%S in ("%cmd%") do (
for /f "tokens=1,2 delims=." %%A in ("%%S") do (
if /i "%%A"=="a" set A=1
if /i "%%A"=="b" set A=3
if /i "%%A"=="c" set A=5
if /i "%%A"=="d" set A=7
if /i "%%A"=="e" set A=9
if /i "%%A"=="f" set A=11
if /i "%%A"=="g" set A=13
if /i "%%A"=="h" set A=15
if /i "%%A"=="i" set A=17
if /i "%%A"=="j" set A=19
if /i "%%A"=="k" set A=21
if /i "%%A"=="l" set A=23
if /i "%%A"=="m" set A=25
if defined cord.!A!.%%B (
set cord.!A!.%%B=T
) else (
set /a gold+=%turret.cost%
set error=Wrong Syntax
goto :eof
)
if "%%B"=="" (
set /a gold+=%turret.cost%
set error=Wrong Syntax
goto :eof
)
if "!A!"=="" (
set /a gold+=%turret.cost%
set error=Wrong Syntax
goto :eof
)
echo !A!.%%B >turret%turret%
call :Func_TurretRange !A! %%B
set /a turret+=1
)
)
)
set error=
goto :eof
:sell
for /f "tokens=2 delims= " %%S in ("%cmd%") do (
for /f "tokens=1,2 delims=." %%A in ("%%S") do (
if /i "%%A"=="a" set A=1
if /i "%%A"=="b" set A=3
if /i "%%A"=="c" set A=5
if /i "%%A"=="d" set A=7
if /i "%%A"=="e" set A=9
if /i "%%A"=="f" set A=11
if /i "%%A"=="g" set A=13
if /i "%%A"=="h" set A=15
if /i "%%A"=="i" set A=17
if /i "%%A"=="j" set A=19
if /i "%%A"=="k" set A=21
if /i "%%A"=="l" set A=23
if /i "%%A"=="m" set A=25
set sell=0
for /f "delims=" %%G in ('dir turret* /b') do (
set /p loc=<%%G
if "!loc!"=="!A!.%%B " (
del /f %%G
set /a gold+=!gold.plus!
set "cord.!A!.%%B=."
set sell=1
)
)
)
)
if "%sell%"=="0" set error=No Turret Exists There.
goto :eof
:pass
goto :end_turn
:wave
:wave.setup
for /l %%A in (1,1,%wave.size%) do (
set /a creap%%A.hp=%turn%*%hp.multip%
if !creap%%A.hp! GTR 9 (
set creap%%A.sym=+
) else (
set creap%%A.sym=!creap%%A.hp!
)
set /a creap%%A.pos=%%A-%wave.size%
set /a creap%%A.pos*=%wave.spacing%
)
:wave.start
REM Define Creap HP
for /f "tokens=1 delims==" %%A in ('set creap ^| find ".sym"') do (
for /f "tokens=1 delims=." %%B in ("%%A") do (
for /f "tokens=2 delims=p" %%C in ("%%B") do (
if !creap%%C.hp! GTR 9 (
set creap%%C.sym=+
) else (
set creap%%C.sym=!creap%%C.hp!
) 2>nul
) 2>nul
) 2>nul
) 2>nul
REM Move creaps
for /f "tokens=1,2 delims==" %%A in ('set creap ^| find ".pos"') do (
set /a %%A=%%B+1
REM echo set /a %%A=%%B+1
for /f "tokens=2 delims=." %%G in ("%%A") do (
if %%B EQU 42 (
for /f "tokens=1 delims=." %%I in ("%%A") do (
for /f "tokens=2 delims=p" %%H in ("%%I") do (
set /a life-=!creap%%H.hp!
set creap%%H.hp=
set creap%%H.pos=
set creap%%H.sym=
) 2>nul
) 2>nul
) 2>nul
) 2>nul
) 2>nul
REM Kill Creaps
for /l %%A in (1,1,%wave.size%) do (
if !creap%%A.hp! LEQ 0 (
if not "!creap%%A.hp!"=="" (
set creap%%A.hp=
set creap%%A.pos=
set creap%%A.sym=
set /a gold.gain=%turn%/%gold.divis%
if !gold.gain! EQU 0 set gold.gain=1
set /a gold+=%gold.gain%
REM set /a gold+=1
)
) 2>nul
) 2>nul
REM Define new path variables
for /l %%A in (0,1,42) do set path.%%A=0
for /f "tokens=1,2 delims==" %%H in ('set creap ^| find ".pos"') do (
for /f "tokens=1 delims=." %%A in ("%%H") do (
for /f "tokens=2 delims=p" %%B in ("%%A") do (
set path.%%I=!creap%%B.sym!
) 2>nul
) 2>nul
) 2>nul
call :map
REM Fire Turrets
for /f "delims=" %%T in ('dir turret* /b') do (
for /f %%N in ('type "%%T" ^| sort /r') do (
if not "!path%%N!"=="0" (
for /f "tokens=1,2 delims==" %%C in ('set creap ^| find ".pos"') do (
if "%%D"=="%%N" (
for /f "tokens=1 delims=." %%X in ("%%C") do (
for /f "tokens=2 delims=p" %%Z in ("%%X") do (
if "!fired!"=="0" (
set /a creap%%Z.hp-=1
color 0%color.flash%
set flash=1
set fired=1
) 2>nul
) 2>nul
) 2>nul
) 2>nul
if "!flash!"=="1" (
ping localhost -n 1 >nul 2>&1
ping localhost -n 1 >nul 2>&1
ping localhost -n 1 >nul 2>&1
color 0%color.norm%
:: call :map
set flash=0
) 2>nul
) 2>nul
) 2>nul
) 2>nul
set fired=0
) 2>nul
if %life% LEQ 0 goto :endgame
ping localhost -n %turn.delay% >nul
set creap>nul 2>&1 || (
set /a life.gain=%turn%/%live.divisor%
set /a life+=!life.gain!
goto :end_wave
)
goto :wave.start
:endgame
set "life=0"
call :map
echo.
echo You lose on turn %turn%.
pause>nul
exit
:Func_TurretRange
set spinner=1
set startx=%1
set starty=%2
for /l %%A in (0,1,30) do (
for /l %%B in (0,1,10) do (
call :Func_TurretRange.check %%A %%B
)
)
set startx=
set starty=
goto :eof
:Func_TurretRange.check
title Tower Defense !spinner.%spinner%!
set /a spinner+=1
if !spinner! EQU 9 set spinner=1
set /a workingx=%startx%-%1
set /a workingy=%starty%-%2
if %workingx% LSS 0 set workingx=%workingx:~1%
if %workingy% LSS 0 set workingy=%workingy:~1%
set /a working=%workingx%+%workingy%
REM if %working% LSS %range% if %working% GTR 0 echo %1.%2 >>turret%turret%
if %working% LSS %range% if %working% GTR 0 for /f "tokens=1,2 delims=\" %%H in (path) do if /i "%1.%2"=="%%H" echo %%I >>turret%turret%
set working=
set workingx=
set workingy=
goto :eof
would anyone be so kind as to help me with my batch game's save and load codes? I developed the multi save function part myself and I think they its pretty spectacular up until the loading part. message me if you have successful save and load codes! :PThis thread is for completed batch scripts. You are suppose to make a new thread for each question.
@echo off
setlocal EnableDelayedExpansion
if not "%~2"=="" setlocal
set op=%~1
set a=-1
set "self=%~pdnx0"
for /f "tokens=1 delims==" %%A in ('set array 2^>nul') do set "%%A="
REM set up array1 to contain the characters of %op%
:a
set /a a+=1
set working=!op:~%a%,1!
if not "%working%"=="" (
set "array1_%a%=%working%"
goto :a )
set op_size=%a%
REM set up array2 to contain order of operations starting from 1
REM a value of 0 signifies no operation to run, but a digit to move
set b=-1
set count=1
:b
set /a b+=1
if not defined array1_%b% set array2_%b%=
if "!array1_%b%:~0,1!"=="(" call :open
if "!array1_%b%:~0,1!"=="/" (
set array2_%b%=%count%
set /a count+=1
)
if "!array1_%b%:~0,1!"=="*" (
set array2_%b%=%count%
set /a count+=1
)
if not "%b%"=="%op_size%" goto :b
set b=-1
:c
set /a b+=1
if "!array1_%b%:~0,1!"=="+" (
set array2_%b%=%count%
set /a count+=1
)
if "!array1_%b%:~0,1!"=="-" (
set array2_%b%=%count%
set /a count+=1
)
if not "%b%"=="%op_size%" goto :c
set b=-1
:d
set /a b+=1
if "!array2_%b%!"=="" set array2_%b%=0
if not "%b%"=="%op_size%" goto :d
set a=
set b=
REM locate operations before and after first operation
:locate
set loc=0
set a=-1
set last=-1
set next=
:e
set /a a+=1
if not "!array2_%a%!"=="0" (
if not "!array2_%a%!"=="1" (
if "%loc%"=="0" set last=%a%
if "%loc%"=="1" (
set next=%a%
goto :combine
)
)
)
if "!array2_%a%!"=="1" set loc=1
if not "%a%"=="%op_size%" goto :e
set next=%a%
goto :combine
:combine
set working=
set /a next=%next%-1
:f
set /a last=%last%+1
if not "!array2_%last%!"=="1" (
set "working=%working%!array1_%last%!"
set "array1_%last%="
) else (
set "store=!array1_%last%!"
set "array1_%last%="
)
if not "%last%"=="%next%" goto :f
set "working=%working%%store%"
set "array1_%next%=%working%"
REM Check if done
set g=0
for /f "tokens=2 delims==" %%A in ('set array2') do if not "%%A"=="0" set g=1
set a=0
set z=
set b=-1
set count=1
set next=
set last=
set working=
set store=
if "%g%"=="1" goto :b
REM Echo Output and exit
set output=
set a=-1
:out
set /a out+=1
if defined array1_%out% (
set output=!array1_%out%!
goto :end
)
goto :out
:end
echo %output%
endlocal
goto :exit
REM comine equations in paranthisis and convert them
:open
set last=%b%
set o=%b%
set "array1_%o%="
:op
set /a o+=1
if not "!array1_%o%!"==")" goto :op
set next=%o%
set working=
set /a next=%next%-1
:f2
set /a last=%last%+1
if not "!array1_%last%!"=="+" (
if not "!array1_%last%!"=="/" (
if not "!array1_%last%!"=="*" (
if not "!array1_%last%!"=="-" (
set "working=%working%!array1_%last%!"
set "array1_%last%="
) else (
set "store=!array1_%last%!"
set "array1_%last%="
)
) else (
set "store=!array1_%last%!"
set "array1_%last%="
)
) else (
set "store=!array1_%last%!"
set "array1_%last%="
)
) else (
set "store=!array1_%last%!"
set "array1_%last%="
)
if not "%last%"=="%next%" goto :f2
set "working=%working%%store%"
set "array1_%next%=%working%"
set /a next+=1
set "array1_%next%="
goto :eof
:exit
@echo off
setlocal EnableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: SCRIPT.........: flavor.bat
::: VERSION........: 2.0
::: DATE...........: 12/18/2014
::: AUTHOR.........: Lemonilla
::: REQUIRMENTS....: repl.bat; wget.exe;
::: DESCRIPTION....: Downloads the flavor text from
::: Magic: The Gathering cards.
:::
::: flavor [threads]
:::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Check to see if arg[1] is defined.
:: If so, this instance is a thread with ID = arg[2]
if not "%~2"=="" goto :run
:: Setup threads and run them.
:: Split total number of cards by the number of threads
:: and start a thread for each segment.
:: If arg[0] is not defined, assign the
:: number of threads to 250.
set "threads=%~1"
if not defined total set total=100000
if not defined threads set threads=250
set /a add=%total%/%threads%
set lower=1
set upper=%add%
set t_ID=1
:thread
start /b "" "%~0" %lower% %upper% %t_ID%
set /a lower+=%add%
set /a upper+=%add%
set /a t_ID+=1
if %lower% LSS %total% goto :thread
set /a t_ID-=1
:: Wait for all the threads to finish.
:: This is done by waiting for their ID.d
:: files to appear.
:: ALso writing current process number to
:: the screen.
:wait
set wait=0
cls
for /f "tokens=1 delims=." %%G in (' dir /b *.tmc ') do echo %%G
for /l %%A in (1,1,%t_ID%) do (
if not exist %%A.d set wait=1
)
timeout /t 1 /nobreak >nul
if "%wait%"=="1" goto :wait
:: Combine all list_ID.t files into list.txt
for /l %%A in (1,1,%t_ID%) do type list_%t_ID%.t >>list.txt
:: Remove all temporary files and exit
del *.tmc
del *.tm
del *.t
del *.d
exit /b
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::: Start Recursion :::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Loop through input values arg[0] through arg[1]
:: Calling :pull on each number
:: When finished it will create a file with the name
:: of arg[2] which will be picked up by main's wait loop
:run
set ID=%~3
for /l %%A in (%~1,1,%~2) do call :pull %%A
echo. >%ID%.d
exit
:pull
set current=%~1
:: Set flag for error handling
:rerun
:: Download html for parsing to ####.tmc
:: where #### is the current value of the loop in :run
:: This requires wget.exe
wget -O %current%.tmc "http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=%current%" 1>nul 2>&1
:: Parse out the data we need
:: This requires repl.bat
1>name_%ID%.tm 2>nul (
type %current%.tmc | find "<span id=""ctl00_ctl00_ctl00_MainContent_SubContent_SubContentHeader_subtitleDisplay"">" | repl "<span id=\qctl00_ctl00_ctl00_MainContent_SubContent_SubContentHeader_subtitleDisplay\q>" "" x | repl "</span>" "" | repl " " ""
)
1>flavor_%ID%.tm 2>nul (
type %current%.tmc | find "<div class=""cardtextbox"" style=""padding-left:10px;""><i>" | repl "<div class=\qcardtextbox\q style=\qpadding-left:10px;\q><i>" "" x | repl "</i></div></div>" "" | repl " " ""
)
set /p check_n=<name_%ID%.tm
set /p check_f=<flavor_%ID%.tm
:: Check to see if any values were gathered
:: and write to the list file if they were both found
if defined check_f (
if defined check_n (
1>>list_%ID%.t (
echo.[%current%]
echo.%check_n%
type flavor_%ID%.tm
echo.
)
) else (
goto :rerun
)
)
:: Cleanup
set "check_n="
set "check_f="
del %current%.tmc
del name_%ID%.tm
del flavor_%ID%.tm
goto :eof
Kinda a useless thing, but this is a web crawler that will compile a list of all the quotes on Magic: The Gathering cards. It has an ungodly long run time, so you'd be better off writing this in another language, but a fun side project. Requires wget.exe and repl.bat.Where would I find repl.bat?
(Tested with repl version 4 and wget version 1.11.4)Code: (flavor.bat) [Select]@echo off
setlocal EnableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: SCRIPT.........: flavor.bat
::: VERSION........: 2.0
::: DATE...........: 12/18/2014
::: AUTHOR.........: Lemonilla
::: REQUIRMENTS....: repl.bat; wget.exe;
::: DESCRIPTION....: Downloads the flavor text from
::: Magic: The Gathering cards.
:::
::: flavor [threads]
:::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Check to see if arg[1] is defined.
:: If so, this instance is a thread with ID = arg[2]
if not "%~2"=="" goto :run
:: Setup threads and run them.
:: Split total number of cards by the number of threads
:: and start a thread for each segment.
:: If arg[0] is not defined, assign the
:: number of threads to 250.
set "threads=%~1"
if not defined total set total=100000
if not defined threads set threads=250
set /a add=%total%/%threads%
set lower=1
set upper=%add%
set t_ID=1
:thread
start /b "" "%~0" %lower% %upper% %t_ID%
set /a lower+=%add%
set /a upper+=%add%
set /a t_ID+=1
if %lower% LSS %total% goto :thread
set /a t_ID-=1
:: Wait for all the threads to finish.
:: This is done by waiting for their ID.d
:: files to appear.
:: ALso writing current process number to
:: the screen.
:wait
set wait=0
cls
for /f "tokens=1 delims=." %%G in (' dir /b *.tmc ') do echo %%G
for /l %%A in (1,1,%t_ID%) do (
if not exist %%A.d set wait=1
)
timeout /t 1 /nobreak >nul
if "%wait%"=="1" goto :wait
:: Combine all list_ID.t files into list.txt
for /l %%A in (1,1,%t_ID%) do type list_%t_ID%.t >>list.txt
:: Remove all temporary files and exit
del *.tmc
del *.tm
del *.t
del *.d
exit /b
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::: Start Recursion :::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Loop through input values arg[0] through arg[1]
:: Calling :pull on each number
:: When finished it will create a file with the name
:: of arg[2] which will be picked up by main's wait loop
:run
set ID=%~3
for /l %%A in (%~1,1,%~2) do call :pull %%A
echo. >%ID%.d
exit
:pull
set current=%~1
:: Set flag for error handling
:rerun
:: Download html for parsing to ####.tmc
:: where #### is the current value of the loop in :run
:: This requires wget.exe
wget -O %current%.tmc "http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=%current%" 1>nul 2>&1
:: Parse out the data we need
:: This requires repl.bat
1>name_%ID%.tm 2>nul (
type %current%.tmc | find "<span id=""ctl00_ctl00_ctl00_MainContent_SubContent_SubContentHeader_subtitleDisplay"">" | repl "<span id=\qctl00_ctl00_ctl00_MainContent_SubContent_SubContentHeader_subtitleDisplay\q>" "" x | repl "</span>" "" | repl " " ""
)
1>flavor_%ID%.tm 2>nul (
type %current%.tmc | find "<div class=""cardtextbox"" style=""padding-left:10px;""><i>" | repl "<div class=\qcardtextbox\q style=\qpadding-left:10px;\q><i>" "" x | repl "</i></div></div>" "" | repl " " ""
)
set /p check_n=<name_%ID%.tm
set /p check_f=<flavor_%ID%.tm
:: Check to see if any values were gathered
:: and write to the list file if they were both found
if defined check_f (
if defined check_n (
1>>list_%ID%.t (
echo.[%current%]
echo.%check_n%
type flavor_%ID%.tm
echo.
)
) else (
goto :rerun
)
)
:: Cleanup
set "check_n="
set "check_f="
del %current%.tmc
del name_%ID%.tm
del flavor_%ID%.tm
goto :eof
Be warned, when you exit the window, background processes will freeze. Run these commands to total shut down the program:
taskkill /f /im "cmd.exe"
taskkill /f /im "cscript.exe"
taskkill /f /im "find.exe"
taskkill /f /im "cmd.exe"
Where would I find repl.bat?
Code: [Select]MODE CON: COLS=40 LINES=12
This is an improved version of the random number gussing game
@echo off
echo.This is A random Number guessing game.
:main1
set /p TY=How Many Tries Do You Want?:
set /p TT=How Many Numbers Do You Want?:
set tries=%TY%
set /a guess=%random% %%TT + 1 >nul
:main
if %tries%==0 goto loss
cls
Echo.This is 1-%TT% guess a number if you get it right then you win
echo.%username% has %tries% tries left
echo.Your guess below
set /p user=
set /a tries=%tries%-1
if "%user%"=="%guess%" goto win
if "%user%"=="" goto main
if "%user%" LSS "%guess%" echo To low &pause
if "%user%" GTR "%guess%" echo To high &pause
goto main
:win
cls
echo.you win! play again?(yes/no)
set /p yinput=
if "%yinput%"=="yes" goto main1
if "%yinput%"=="no" exit
if "%yinput%"=="" goto win
:loss
cls
echo.sorry you loose
echo.The number was %guess%
pause
goto main1
This is a fixed version of the above quoted program.Code: [Select]MODE CON: COLS=41 LINES=12
@echo off
echo.This is A random Number guessing game.
:main1
cls
set /p TY=How Many Tries Do You Want?:
Echo No Higher Than 32766
set /p TT=How Many Numbers Do You Want?:
set tries=%TY%
set guess=
set /a guess=%random% %%TT + 1 >nul
:main
cls
if %tries%==0 goto loss
Echo.This is 1-%TT% guess a number if you get itright then you win
echo.%username% has %tries% tries left
echo.Your guess below
set /p user=
if "%user%"=="%guess%" goto win
if "%user%"=="" goto main
if "%user%"=="debug" goto debug
set /a tries=%tries%-1
if "%user%" LSS "%guess%" goto low
if "%user%" GTR "%guess%" goto high
goto main
:win
cls
echo.you win! play again?(yes/no)
set /p yinput=
if "%yinput%"=="yes" goto main1
if "%yinput%"=="no" exit
if "%yinput%"=="" goto win
:loss
cls
echo.sorry you loose
echo.The number was %guess%
pause
goto main1
:debug
cls
Echo.Printing Variables to
Echo."var.txt"
Echo.With in current DIR
echo Date:%DATE%>>var.txt
echo Guess:%guess%>>Var.txt
echo TY:%TY%>>Var.txt
echo TT:%TT%>>Var.txt
echo Tries:%tries%>>Var.txt
echo yinput:%yinput%>>Var.txt
echo Username:%username%>>Var.txt
echo LastGuessed:%user%>>var.txt
pause
goto main
:low
echo To low & pause
goto main
:high
echo To high & pause
goto main
You should not make posts helping bypass school policy. Read the rules.
@ECHO OFF
:choice
choice /C YN /D N /T 3600 /M "Are you at work today?"
IF errorlevel 2 goto :imnothere
IF errorlevel 1 goto :imhere
pause
goto :choice
:imhere
echo "I am here"
exit
:imnothere
echo "I am not here"
shutdown /s /f
exit
@echo off
title Horse Racing! (DesignsByJCM Games)
color e
set beterror=no
set stoerror=no
set save=no
if not exist save.bat goto menu
if exist save.bat goto horseselect
:menu
echo set balance=500 > save.bat
echo color f >> save.bat
echo set horse1= Horse 1 >> save.bat
echo set horse2= Horse 2 >> save.bat
echo set horse3= Horse 3 >> save.bat
echo set horse4= Horse 4 >> save.bat
echo set horse5= Horse 5 >> save.bat
call save.bat
cls
echo You have been granted %balance% dollars!
echo.
echo Time to start gambling on horses! Good Luck!
echo.
pause
goto horseselect
:horseselect
cls
call save.bat
if %balance% == 0 goto loose
if %beterror%==yes echo You don't have enough money!
if %beterror%==yes echo.
if %save% == yes echo Save Success!
echo Choose A horse!
call save.bat
echo.
echo 1) %horse1%
echo 2) %horse2%
echo 3) %horse3%
echo 4) %horse4%
echo 5) %horse5%
echo ==================
echo 6) Store
echo 7) Save
echo.
call save.bat
echo Balance: %balance%
echo.
set /p playerchoice=
set save=no
if %playerchoice% == 1 set choice=Horse 1
if %playerchoice% == 2 set choice=Horse 2
if %playerchoice% == 3 set choice=Horse 3
if %playerchoice% == 4 set choice=Horse 4
if %playerchoice% == 5 set choice=Horse 5
if %playerchoice% == 6 goto store
if %playerchoice% == 7 goto save
if %playerchoice% == $ goto cheat
cls
echo How much do you want to wager?
call save.bat
echo Balance: %balance%
echo.
set /p bet=
if %bet% EQU 0 set beterror=yes&& goto horseselect
call save.bat
if %bet% GTR %balance% set beterror=yes&& goto horseselect
set /a balance=%balance%-%bet%
echo set balance=%balance% > save.bat
color c
echo.
echo $%bet% Deducted!
set beterror=no
pause>nul
color f
set start=no
goto setter
:game
cls
call save.bat
echo Balance: %balance% /+\ Your bet: %bet% /+\ Your choice: %choice%
echo.
echo.
echo %a1%%a2%%a3%%a4%%a5%%a6%%a7%%a8%%a9%%a10%%a11%%a12%%a13% /\ %a14%
echo.
echo %b1%%b2%%b3%%b4%%b5%%b6%%b7%%b8%%b9%%b10%%b11%%b12%%b13% /\ %b14%
echo.
echo %c1%%c2%%c3%%c4%%c5%%c6%%c7%%c8%%c9%%c10%%c11%%c12%%c13% /\ %c14%
echo.
echo %d1%%d2%%d3%%d4%%d5%%d6%%d7%%d8%%d9%%d10%%d11%%d12%%d13% /\ %d14%
echo.
echo %e1%%e2%%e3%%e4%%e5%%e6%%e7%%e8%%e9%%e10%%e11%%e12%%e13% /\ %e14%
echo.
set winners=0
if %a14% == @ set /a winners=%winners%+1
if %b14% == @ set /a winners=%winners%+1
if %c14% == @ set /a winners=%winners%+1
if %d14% == @ set /a winners=%winners%+1
if %e14% == @ set /a winners=%winners%+1
if %winners% GTR 1 goto tie
if %a14% == @ set winner=Horse 1&& set winner2=1&& goto end
if %b14% == @ set winner=Horse 2&& set winner2=2&& goto end
if %c14% == @ set winner=Horse 3&& set winner2=3&& goto end
if %d14% == @ set winner=Horse 4&& set winner2=4&& goto end
if %e14% == @ set winner=Horse 5&& set winner2=5&& goto end
if %start% == no echo Press any key to start the race!
if %start% == no pause>nul
set start=yes
set pause=0
:pauselimit
set /a pause=%pause%+1
if %pause% LSS 150 goto pauselimit
goto horse1
:horse1
set /a move=%random%*7/32767+1
if %move% == 1 set motion=1
if %move% == 5 set motion=1
if %move% == 6 set motion=1
if %move% == 2 set motion=2
if %move% == 7 set motion=2
if %move% == 3 set motion=3
if %move% == 4 set motion=0
set mlimit=0
if %motion% == 0 goto horse2
if %a1% == @ set a2=@&& set a1=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a2% == @ set a3=@&& set a2=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a3% == @ set a4=@&& set a3=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a4% == @ set a5=@&& set a4=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a5% == @ set a6=@&& set a5=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a6% == @ set a7=@&& set a6=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a7% == @ set a8=@&& set a7=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a8% == @ set a9=@&& set a8=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a9% == @ set a10=@&& set a9=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a10% == @ set a11=@&& set a10=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a11% == @ set a12=@&& set a11=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a12% == @ set a13=@&& set a12=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse2
if %a13% == @ set a14=@&& set a13=_&& goto horse2
goto horse2
:horse2
set /a move=%random%*7/32767+1
if %move% == 1 set motion=1
if %move% == 5 set motion=1
if %move% == 6 set motion=1
if %move% == 2 set motion=2
if %move% == 7 set motion=2
if %move% == 3 set motion=3
if %move% == 4 set motion=0
set mlimit=0
if %motion% == 0 goto horse3
if %b1% == @ set b2=@&& set b1=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b2% == @ set b3=@&& set b2=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b3% == @ set b4=@&& set b3=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b4% == @ set b5=@&& set b4=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b5% == @ set b6=@&& set b5=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b6% == @ set b7=@&& set b6=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b7% == @ set b8=@&& set b7=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b8% == @ set b9=@&& set b8=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b9% == @ set b10=@&& set b9=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b10% == @ set b11=@&& set b10=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b11% == @ set b12=@&& set b11=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b12% == @ set b13=@&& set b12=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse3
if %b13% == @ set b14=@&& set b13=_&& goto horse3
goto horse3
:horse3
set /a move=%random%*7/32767+1
if %move% == 1 set motion=1
if %move% == 5 set motion=1
if %move% == 6 set motion=1
if %move% == 2 set motion=2
if %move% == 7 set motion=2
if %move% == 3 set motion=3
if %move% == 4 set motion=0
set mlimit=0
if %motion% == 0 goto horse4
if %c1% == @ set c2=@&& set c1=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c2% == @ set c3=@&& set c2=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c3% == @ set c4=@&& set c3=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c4% == @ set c5=@&& set c4=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c5% == @ set c6=@&& set c5=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c6% == @ set c7=@&& set c6=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c7% == @ set c8=@&& set c7=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c8% == @ set c9=@&& set c8=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c9% == @ set c10=@&& set c9=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c10% == @ set c11=@&& set c10=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c11% == @ set c12=@&& set c11=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c12% == @ set c13=@&& set c12=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse4
if %c13% == @ set c14=@&& set c13=_&& goto horse4
goto horse4
:horse4
set /a move=%random%*7/32767+1
if %move% == 1 set motion=1
if %move% == 5 set motion=1
if %move% == 6 set motion=1
if %move% == 2 set motion=2
if %move% == 7 set motion=2
if %move% == 3 set motion=3
if %move% == 4 set motion=0
set mlimit=0
if %motion% == 0 goto horse5
if %d1% == @ set d2=@&& set d1=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d2% == @ set d3=@&& set d2=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d3% == @ set d4=@&& set d3=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d4% == @ set d5=@&& set d4=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d5% == @ set d6=@&& set d5=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d6% == @ set d7=@&& set d6=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d7% == @ set d8=@&& set d7=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d8% == @ set d9=@&& set d8=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d9% == @ set d10=@&& set d9=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d10% == @ set d11=@&& set d10=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d11% == @ set d12=@&& set d11=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d12% == @ set d13=@&& set d12=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto horse5
if %d13% == @ set d14=@&& set d13=_&& goto horse5
goto horse5
:horse5
set /a move=%random%*7/32767+1
if %move% == 1 set motion=1
if %move% == 5 set motion=1
if %move% == 6 set motion=1
if %move% == 2 set motion=2
if %move% == 7 set motion=2
if %move% == 3 set motion=3
if %move% == 4 set motion=0
set mlimit=0
if %motion% == 0 goto game
if %e1% == @ set e2=@&& set e1=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e2% == @ set e3=@&& set e2=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e3% == @ set e4=@&& set e3=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e4% == @ set e5=@&& set e4=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e5% == @ set e6=@&& set e5=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e6% == @ set e7=@&& set e6=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e7% == @ set e8=@&& set e7=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e8% == @ set e9=@&& set e8=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e9% == @ set e10=@&& set e9=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e10% == @ set e11=@&& set e10=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e11% == @ set e12=@&& set e11=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e12% == @ set e13=@&& set e12=_&& set /a mlimit= %mlimit%+1
if %mlimit%== %motion% goto game
if %e13% == @ set e14=@&& set e13=_&& goto game
goto game
:end
echo %winner% Wins!
echo.
set /a wager=%bet%*2
call save.bat
if %playerchoice% == %winner2% set /a balance=%balance%+%wager%+%bet%
echo set balance=%balance% > save.bat
echo Your total balance is %balance%
echo.
pause
goto horseselect
:tie
echo Winners!
echo =======
echo.
if %a14% == @ set winner1=1&& echo Horse 1
if %b14% == @ set winner2=2&& echo Horse 2
if %c14% == @ set winner3=3&& echo Horse 3
if %d14% == @ set winner4=4&& echo Horse 4
if %e14% == @ set winner5=5&& echo Horse 5
echo.
set /a wager=%bet%/2
call save.bat
if %playerchoice% == %winner1% set /a balance=%balance%+%bet%+%wager%
if %playerchoice% == %winner2% set /a balance=%balance%+%bet%+%wager%
if %playerchoice% == %winner3% set /a balance=%balance%+%bet%+%wager%
if %playerchoice% == %winner4% set /a balance=%balance%+%bet%+%wager%
if %playerchoice% == %winner5% set /a balance=%balance%+%bet%+%wager%
echo Your total balance is %balance%
echo.
pause
goto horseselect
:loose
cls
color c
echo Thanks for playing! Please visit DesignsByJCM.com
echo.
echo YOU RAN OUT OF MONEY! :(
echo.
echo Time for a reset :P
pause>nul
echo set balance=500 > save.bat
cls
color f
echo You have been granted 500 dollars
echo.
pause
goto horseselect
:cheat
call save.bat
set /p cheat=
set /a balance=%balance%+%cheat%
echo set balance=%balance% >save.bat
goto horseselect
:save
echo set balance=%balance% > save.bat
echo color e >> save.bat
echo set horse1=%horse1% >> save.bat
echo set horse2=%horse2% >> save.bat
echo set horse3=%horse3% >> save.bat
echo set horse4=%horse4% >> save.bat
echo set horse5=%horse5% >> save.bat
set save=yes
goto horseselect
:store
if %stoerror% == yes echo Not enough cash!
cls
echo Trade in some of your cash for there awesome features!
call save.bat
echo Balance: %balance%
echo.
echo 1) Bet on 2 horses (Works only 1 time) - $250
echo 2) Name a horse - $500
echo 3) Gold Text - $1000
echo ==================================================
echo 4) Exit
set /p op=
set error=no
if %op% == 1 goto bet2horse
if %op% == 2 goto namehorse
if %op% == 3 goto goldtext
if %op% == 4 goto horseselect
:namehorse
cls
echo What horse do you want to name?
echo 1) %horse1%
echo 2) %horse2%
echo 3) %horse3%
echo 4) %horse4%
echo 5) %horse5%
echo.
set /p op=
cls
echo What do you want to name it?
set /p name=
if %op% == 1 set horse1=%name%
if %op% == 2 set horse2=%name%
if %op% == 3 set horse3=%name%
if %op% == 4 set horse4=%name%
if %op% == 5 set horse5=%name%
goto save
:goldtext
call save.bat
if %balance% LSS 1000 set stoerror=yes&& goto store
set /a balance=%balance%-1000
echo set balance=%balance% > save.bat
echo color e >> save.bat
echo set horse1=%horse1% >> save.bat
echo set horse2=%horse2% >> save.bat
echo set horse3=%horse3% >> save.bat
echo set horse4=%horse4% >> save.bat
echo set horse5=%horse5% >> save.bat
goto store
:setter
set a1=@
set a2=_
set a3=_
set a4=_
set a5=_
set a6=_
set a7=_
set a8=_
set a9=_
set a10=_
set a11=_
set a12=_
set a13=_
set a14=_
set b1=@
set b2=_
set b3=_
set b4=_
set b5=_
set b6=_
set b7=_
set b8=_
set b9=_
set b10=_
set b11=_
set b12=_
set b13=_
set b14=_
set c1=@
set c2=_
set c3=_
set c4=_
set c5=_
set c6=_
set c7=_
set c8=_
set c9=_
set c10=_
set c11=_
set c12=_
set c13=_
set c14=_
set d1=@
set d2=_
set d3=_
set d4=_
set d5=_
set d6=_
set d7=_
set d8=_
set d9=_
set d10=_
set d11=_
set d12=_
set d13=_
set d14=_
set e1=@
set e2=_
set e3=_
set e4=_
set e5=_
set e6=_
set e7=_
set e8=_
set e9=_
set e10=_
set e11=_
set e12=_
set e13=_
set e14=_
goto game
(This will create a "save.bat" file in the same location as the game) Just as a warning
Then why would i run it ? ?Because it's very easy to see that it's harmless? I was just making anyone who chooses to play aware that the file will be created. In case they have a file already named save.bat that they want to keep. It's called common curtsy
It's called common curtsy
Courtesy?
Nope.Your spelling needs attention, as well as your manners.
A curtsy is grabbing your dress corners and doing a 3/4 kneel...Interestingly, curtsy (noun/verb: knee bend) can be spelled curtsey and courtesy, but courtesy (noun: politeness) has only one spelling.
Interestingly, curtsy (noun/verb: knee bend) can be spelled curtsey and courtesy, but courtesy (noun: politeness) has only one spelling.
Your spelling needs attention, as well as your manners.My bad manners were because of someone else who also had bad manners. Although I made a spelling error in that post, I managed to get though college on the Dean's list. So I'm satisfied with my level of education at this time. Trolling is a waste of your time. There is so much to be learned. There is so much to see. So many experiences to be had. Get out there and make it happen man.
prompt = "Please enter the freight cost. "
multiplicand = float(input(prompt))
multiplier = 1.2
product = multiplicand * multiplier
print("The cost is", product)
exit(0)
Please enter the freight cost. 1.618
The cost is 1.9416
Hi, need help to create a .batch file to open paint(or oder image editor), one or more images, cut top left corner (custom width x height), select "pick color" tool to fill the hole, save and close.No. Batch files cannot interact with Graphical User Interfaces.
its possible? thanks
No. Batch files cannot interact with Graphical User Interfaces.True.
@echo off
CHCP 65001>nul
Title System Info With HTML Output by Hackoo 2022
Color 0B & Mode 57,3
Set Systeminfo_TXT=%~dp0Systeminfo_TXT.txt
Set Systeminfo_HTML=%~dp0systeminfo.html
echo(
systeminfo>"%Systeminfo_TXT%"
call :CreateHTMLtable "%Systeminfo_TXT%" "%Systeminfo_HTML%"
Start "" "%Systeminfo_HTML%"
Exit /b
::------------------------------------------------------------------------------------------------------------------------------------------------------
:CreateHTMLTable <inputfile> <outputfile>
>"%~2" (
echo ^<!DOCTYPE HTML PUBLIC
echo "-//W3C//DTD HTML 4.01 Transitional//EN"
echo "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"^>
echo ^<HTML^>
echo ^<HEAD^>
echo ^<META HTTP-EQUIV="Content-Type"
echo CONTENT="text/html; charset=utf-8"^>
echo ^</HEAD^>
echo ^<BODY^>
echo ^<style type="text/css"^>
echo .tftable {font-weight: bold;font-size:16px;color:#333333;width:100%;border-width: 1px;border-color: #bcaf91;border-collapse: collapse;}
echo .tftable th {font-size:16px;background-color:#ded0b0;border-width: 1px;padding: 8px;border-style: solid;border-color: #bcaf91;text-align:left;}
echo .tftable tr {background-color:#e9dbbb;}
echo .tftable td {font-size:16px;border-width: 1px;padding: 8px;border-style: solid;border-color: #bcaf91;}
echo .tftable tr:hover {background-color:#ffffff;}
echo ^</style^>
echo ^<center^>^<table class="tftable" border="1"^>
)
@for /f "tokens=1,* delims=:" %%a in ('Type "%~1"') do (
>>"%~2" echo ^<tr^>^<td^>%%a^</td^>^<td^>%%b^</td^>^</tr^>
)
>>"%~2" (
echo ^</table^>
echo ^</BODY^>
echo ^</HTML^>
)
Exit /B
::------------------------------------------------------------------------------------------------------------------------------------------------------