Cov txheej txheem:

Advanced Batch: 12 Kauj Ruam
Advanced Batch: 12 Kauj Ruam

Video: Advanced Batch: 12 Kauj Ruam

Video: Advanced Batch: 12 Kauj Ruam
Video: Intravenous injection in jugular vein l dr umar khan 2024, Kaum ib hlis
Anonim

tab sis qhov tsis zoo, tsuas yog siv CD lossis CHDIR hais kom hloov cov npe. Tab sis nws tsis muaj teeb meem tiag hauv qhov no. "," Sab saum toj ": 0.08480565371024736," sab laug ": 0.014285714285714285," qhov siab ": 0.8586572438162544," dav ": 0.9357142857142857}]">

Advanced Batch
Advanced Batch
Advanced Batch
Advanced Batch
Advanced Batch
Advanced Batch

THOV NYEEM NTAWV NUG cov lus nug uas koj yuav tsum muaj rau kuv BLOG: https://tamsanh.com/blog/2008/07/11/batch-tutorial-3-advanced-batch/Kuv tsis mus xyuas cov lus qhia ntxiv lawm, thiab koj yuav tau txais sai dua Teb li ntawd. Tam Nguyen nyob ntawm no. Nws tau ntev lawm los, tab sis nws nyob ntawm no tam sim no! Kuv nthuav qhia rau koj qhov kev kawm txuas ntxiv ntawm kuv Batch Tutorials! Koj tuaj yeem (lossis yuav tsis tau) tau nyeem kuv lwm cov lus qhia: Cov hauv paus ntawm Batch Ntawd yog: ECHO CommandCD CommandDIR CommandIf koj tsis tau nyeem ob qho ntxiv, kuv hais kom saib dua cov lus txib kom sai. Kuv yuav tos ntawm no. Ok! Thaum kawg ntawm Cov Lus Qhia no, koj yuav muaj kev sib raug zoo nrog: START CommandSET CommandIF CommandGOTO Commandand> thiab >> ParametersWith cov lus txib no, koj yuav tuaj yeem ua cov ntaub ntawv muaj zog uas tuaj yeem hloov pauv raws li tus neeg siv tswv yim Yog li, cia peb qhib qhov ntawd zoo 'ol Command Prompt thiab pib! Khiav-> cmd Lwm qhov, koj tuaj yeem mus rau: Start-> Program Files-> Accessories-> Command PromptMy piav qhia hauv qhov kev qhia no tau ntev me ntsis, yog li kuv tau faib qee cov lus txib rau ntau dua ib nplooj ntawv feem ntau rau lub hom phiaj zoo nkauj; Kuv nyiam pom cov duab thaum nyeem cov ntawv tsis tas yuav txav mus thiab nqis. Rule ntawm tus ntiv tes xoo rau saib daim duab; Feem ntau tom qab txhua qhov Code Snippet, muaj daim duab. Enjoy!

Kauj Ruam 1: Pib Qhib

START Command
START Command
START Command
START Command
START Command
START Command
START Command
START Command

START Command yog cov lus txib zoo me me uas pib cov khoom! Nws yog cov lus txib yooj yim, thiab yuav pab peb sov ua ntej peb mus rau cov lus txib nyuaj dua.

Qhib ThingToBeStarted.exeYooj yim yooj yim

Qhib WMPlayer.exeTsis tsuas yog koj tuaj yeem pib.exe's, koj tseem tuaj yeem ntaus lub vev xaib hauv, thiab nws yuav qhib rau hauv koj lub browser qub

NYEEM wwwInstructables.comYooj yim yooj yim, eh? Ok. Tam sim no cia peb txav mus rau cov nqaij tiag ntawm Cov Lus Qhia: SET Command.

Kauj Ruam 2: SET Command - Txoj Cai Txoj Cai (1/4)

SET Command - Txoj Cai Txoj Cai (1/4)
SET Command - Txoj Cai Txoj Cai (1/4)
SET Command - Txoj Cai Txoj Cai (1/4)
SET Command - Txoj Cai Txoj Cai (1/4)

SET Command: Qhov Hloov Pauv Definer. Ah. Ntau yam. Tus tsim tawm ambrosia. Variables yog cov khoom nco uas yog… yuam kev, sib txawv. Tsis muaj IFs ANDs lossis NOTs txog nws! (lol, thov txim). Ok! Yog li tus menyuam no ua haujlwm li cas? Yooj yim heev, qhov tsis ua haujlwm ntawm SET hais kom ua yog: SET VariableName = Variable ValueSET los ntawm nws tus kheej yuav tsim cov hlua sib txawv.

SET TestVS = Test Variable String!Hauv qhov no, peb tsuas yog khaws tus nqi "Test Variable String!" mus rau qhov sib txawv TestVS. Well uas yog txhua qhov kev lom zem thiab kev ua si, tab sis peb yuav ua li cas thiaj li rov qab tau tus nqi sib txawv? Peb siv %. Txhua ntxiv % ib ncig ntawm lub npe sib txawv

ECHO %TestVS %Ok txias, tab sis dab tsi ntxiv nws tuaj yeem ua?

Kauj Ruam 3: SET Command - Mr. Math (2/4)

SET Command - Mr. Math (2/4)
SET Command - Mr. Math (2/4)
SET Command - Mr. Math (2/4)
SET Command - Mr. Math (2/4)
SET Command - Mr. Math (2/4)
SET Command - Mr. Math (2/4)

Nws puas tuaj yeem ua lej? Zoo, cia ua ib pawg yooj yim los sim nws.

@ECHO OFFSET Test = 1ECHO%Test%SET Test =%Test%-1ECHO%Test%PAUSEAw, muaj dab tsi tshwm sim? Qhov ntawd yuav tsum tau ua haujlwm! Tos ib pliag … dab tsi yog hais txog SET cov lus txib tsuas yog ua cov hlua? Yog lawm. SET cov lus txib los ntawm nws tus kheej tsuas yog tsim cov hlua sib txawv, lub ntsiab lus nws yuav tsim qhov kev txhais lus feem ntau ntawm tus nqi. Nws tsis xav txog "1 - 1" sib npaug "0", nws xav txog "1 - 1" sib npaug "1 - 1." Yog li peb yuav hloov qhov ntawd li cas? Qhov no txhais tau tias peb xav tig nws los ntawm txoj hlua mus rau hauv kev qhia! Kev hloov pauv yooj yim heev, yooj yim ntxiv a /a rau SET cov lus txib. Kuv qhia qhov tom kawg; nws nrawm dua, thiab cov cai tsis nyuaj heev, tab sis yog tias koj xav tau cov ntaub ntawv ntau, ntawm no nws yog

@ECHO OFFSET /a Test = 2+2ECHO %Test %PAUSEZoo heev! Nws qhia nws zoo kawg nkaus. Tam sim no peb paub tias yuav hloov pauv dab tsi rau peb 'kev xeem lej.bat

@ECHO OFFSET /xeem = 1ECHO%Test%SET /a Test =%Test%-1ECHO%Test%PAUSEOk. Yog li cia peb khiav nws! Zoo kawg! Nws ua haujlwm zoo kawg nkaus! Tab sis dab tsi ntxiv?

Kauj Ruam 4: SET Command - Cov Neeg Siv Khoom (3/4)

SET hais kom ua - Tus neeg siv tswv yim (3/4)
SET hais kom ua - Tus neeg siv tswv yim (3/4)
SET hais kom ua - Tus neeg siv tswv yim (3/4)
SET hais kom ua - Tus neeg siv tswv yim (3/4)
SET hais kom ua - Tus neeg siv tswv yim (3/4)
SET hais kom ua - Tus neeg siv tswv yim (3/4)

SET kuj tseem muaj peev xwm hais kom tus neeg siv nkag mus rau. Yog ntxiv /p rau SET tsis, nws hloov nws los ntawm qhov hloov pauv ib txwm teeb mus rau tus neeg siv tswj kev sib txawv setter.

SET /p UDefine =Nrog rau /p, qhov kev zov me nyuam tau ncua sijhawm, thiab tos rau Tus Neeg Siv Khoom lub tswv yim tab sis tos, Kuv tsis pom a /a parameter, puas yog qhov ntawd txhais tau tias qhov sib txawv yog ib txoj hlua nkaus xwb? Zoo, tsi yog. Qhov /p ntawm qhov tsis ua tiav qhov tsis txaus siab rau /a, thiab yog tias koj sim nws, koj tsuas yog tau txais qhov ua yuam kev ploj lawm. Qhov no txhais tau tias Tus Neeg Siv Cov Lus Txhais tsis sib xws yuav tsis tuaj yeem ntsuas cov kab lus. Yog li cas ib tus tuaj yeem ua dab tsi? SET Command tsis yog txhua qhov kev siv ua ke ntawm cov tsis /p thiab /a, puas yog? Zoo, ua li cas txog kev siv txuas ntxiv ntawm qhov ntsuas /a thiab /p? Ahhh … koj cov khau looj plab hlaub

@ECHO OFFECHO Calculator Version 1.0ECHO. SET /p UDefine = SET /a UDefine =%UDefine%ECHO = ECHO%UDefine%ECHO. PAUSEZoo lub laij lej ya tuaj txog. Yog tias koj tsis tau txiav txim siab tam sim no, {{{ECHO.}}} Yog kab uas tsis muaj dab tsi. Tsis yog qhov txias-txias?

Kauj Ruam 5: SET Cov Lus Hais - Ntau Tshaj Li Qhov Tseeb (4/4)

SET Command - Ntau Tshaj Li Qhov Tseeb (4/4)
SET Command - Ntau Tshaj Li Qhov Tseeb (4/4)
SET Command - Ntau Tshaj Li Qhov Tseeb (4/4)
SET Command - Ntau Tshaj Li Qhov Tseeb (4/4)
SET Command - Ntau Tshaj Li Qhov Tseeb (4/4)
SET Command - Ntau Tshaj Li Qhov Tseeb (4/4)

Txij ntawm no mus, nws yuav zoo li qhov hloov pauv ntawm SET cov lus txib tsuas yog zoo rau cov hlua, thiab kab zauv. Tsis muaj tseeb. Qhov txawv txav, qhov tseeb, hloov pauv tau yooj yim heev, thiab tsis tsuas yog txwv rau ECHOs. Koj puas tau sim sim ntaus tus lej sib txawv los ntawm nws tus kheej?

SET Test = Qhia ntawv%Test%Dab tsi yog qhov yuam kev weird … nws hais tias qhov hais kom ua "Qhia" tsis tau lees paub, tsis yog % Test % tsis muaj cov syntax. Yog li ntawd txhais tau tias DOS saib xyuas txhua qhov sib txawv zoo li nws tau ntaus los ntawm txhais tes. Zoo, yog dab tsi

SET Test = START cmd.exe%Xeem%Zoo heev! Nws ua haujlwm! DOS saib xyuas txhua qhov sib txawv zoo li nws tau ntaus los ntawm tus neeg siv, thiab sau nws raws li. Nov yog tus lej txaus nyiam: (Tsuas yog Luam/Muab Tshuaj; nws nyuaj me ntsis.

@ECHO OffSET Variable1 = ECSET Variable2 = HSET Variable3 = O CSET Variable4 = ooSET Variable5 = l! ECHO%Variable1 %% Variable2 %% Variable3 %% Variable4 %% Variable5%ECHO. %Hloov pauv 5%PauseTsis yog qhov zoo? Txhua qhov sib txawv muaj ob tsab ntawv ntawm tag nrho cov lus (tshwj tsis yog Variable2), thiab tso cov ntawv hloov pauv, txhua tsab ntawv ntxiv, thiab ua tiav tag nrho cov lus txib ntawm ECHO Cool! SET cov lus txib yog ib qho nyuaj dua, thiab cov lus txib muaj zog ntawm DOS phau ntawv txhais lus

Kauj Ruam 6: Yog hais kom ua - Txhua tus neeg sib npaug (1/2)

YOG hais kom ua - Txhua tus neeg sib npaug (1/2)
YOG hais kom ua - Txhua tus neeg sib npaug (1/2)
YOG hais kom ua - Txhua tus neeg sib npaug (1/2)
YOG hais kom ua - Txhua tus neeg sib npaug (1/2)
YOG hais kom ua - Txhua tus neeg sib npaug (1/2)
YOG hais kom ua - Txhua tus neeg sib npaug (1/2)

Qhov kev ua haujlwm zoo li qub. Yooj yim, tab sis muaj zog tsis muaj-qhov-tsawg. Rau rau cov uas tsis tau programmed ua ntej, IF hais kom ua raws nraim li nws lub suab. Yog hais tias qhov kev qhia hauv cov syntax ua pov thawj qhov tseeb (lossis TSIS muaj tseeb) ces cov kab lus tom ntej tom ntej ntawm cov lus txib yuav ua tiav.

YOG%variable1%==%variable2%ECHO Qhov no yog ua tiavlossis yog tias koj muaj ntau dua ib qho syntax

@ECHO OFFIF%variable1%==%variable2%(ECHO Qhov no yog ua tiav. ECHO Yog li no.)Nco tseg: Qhov tshwj xeeb ntawm kev hais lus tsis yog vim kuv tsis ntseeg hauv kev teeb tsa cov cai, tab sis vim tias yog lawv tsis nyob hauv cov chaw ntawd, tag nrho IF cov ntawv luv luv yuav tsis ua haujlwm. Yog li, yog tias muaj ib qho yuam kev nrog koj li IF code, nws yog qhov feem ntau vim yog cov lus sib txuas. Txhawm rau khiav cov pawg tshwj xeeb no, kuv yeej tau siv Command Prompt nws tus kheej, yog li kuv tuaj yeem teeb tsa qhov hloov pauv yam tsis tau hloov kho IfVariableTest.bat ntau sij hawm

Kauj Ruam 7: Yog hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)

YOG hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)
YOG hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)
YOG hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)
YOG hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)
YOG hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)
YOG hais kom ua - Tab sis Kuv Zoo Tshaj Koj (2/2)

Ok, yog li koj tau txais cov lus IF zoo thiab txhua yam, thiab tshuaj xyuas seb cov hloov pauv sib npaug lossis tsis zoo thiab txhua yam, tab sis tsis haum rau daim nqi. Kuv xav tau qee yam tshwm sim yog qhov txawv txav 1 tsawg dua lwm qhov kev hloov pauv! Tsuas yog ua txhua yam lwm yam lus hais lus ua! Zoo tuav koj nees cowboy. Tsis nrawm li Cov ntaub ntawv Batch tsis yog koj li kev ua haujlwm tsis tu ncua. Ua tsis zoo li nws yuav zoo li, "" tsis ua haujlwm nrog Batch cov ntaub ntawv.

EQU - Sib npaug - == NEQ - Tsis EqualLSS - Tsawg duaGTR - Ntau dua ELEQ - Tsawg dua lossis Sib npaugTsuas yog muab cov kev ua no tso rau qhov == Piv txwv

YOG 32 GTR 3 ECHO Qhov No Yuav Ua Haujlwm

@ECHO OFFIF 32 GEQ 32 (ECHO 32 yog Zoo Tshaj, lossis Sib npaug rau 32) ELSE (ECHO 32 yog qhov sib npaug rau 32) PAUSEIF 32 LSS 32 (ECHO 32 Tsawg dua 32? Kuv xav tias tsis yog.) ELSE (ECHO 32 yog Tsis Tsawg Tshaj 32. Xaus zaj dab neeg.) PAUSE

Kauj ruam 8: GOTO Command

TSO Command
TSO Command
TSO Command
TSO Command
TSO Command
TSO Command

GOTO hais kom ua. Nws ua raws nraim li nws hais; nws mus rau daim ntawv lo hauv cov ntawv sau ua pawg. Txhawm rau siv cov lus txib no, koj yuav tsum xub muaj daim ntawv lo nyob hauv qhov chaw. Cov ntawv zoo li no:

: Cov ntawv 1Nws yooj yim ib nyuv ua ntej ib kab ntawv tsis sib nrug ntawm cov ntawv thiab/lossis tus lej. GOTO cov lus txib tau teeb tsa zoo li no

GOTO Label1Nws Yog Qhov Yooj Yim! Tuaj xav txog nws, Kuv tsis paub tseeb tias vim li cas kuv thiaj tsis muab qhov no tso rau hauv Slatch Advanced Batch.

@ECHO OFF: RepeatMeECHO Qhov no yuav rov ua dua tshwj tsis yog koj ntaus "CTRL-C" GOTO RepeatMeCov ntaub ntawv batch hais qhov tseeb, los ntawm txoj kev. CTRL-C yog kev ncua thoob ntiaj teb thiab Kev Cuam Tshuam rau Kev Txiav Txim. CTRL-S tsuas yog ncua. Tab sis Kaw lub qhov rais ua haujlwm ib yam nkaus thiab. GOTO tuaj yeem hla, lossis rov sau koj cov cai ib yam

GOTO TurnEOffGOTO MultipleGotoECHO Qhov ECHO no yuav raug hla mus.: MultipleGotoGOTO 3: ENDPAUSEEXIT: 1ECHO Qhov EndGOTO END: 3ECHO Qhov no yuav tshwm thawj zaug GOTO 2: TurnEOff@ECHO OFFGOTO MultipleGoto: 2ECHO 1Cov cai saum toj no tau teeb tsa tsis meej pem ntawm lub hom phiaj los hais txog GOTO lub peev xwm dhia ib puag ncig hauv txoj cai.

Kauj Ruam 9:> Parameter (1/2)

Piv Txwv Kev Siv
Piv Txwv Kev Siv

Parameter (1/2) "src =" https://content.instructables.com/ORIG/FBH/P5XV/F3JESWI8/FBHP5XVF3JESWI8-j.webp

Piv Txwv Kev Siv
Piv Txwv Kev Siv

Parameter (1/2) "src =" https://content.instructables.com/ORIG/FIX/9BXW/F3JESWI5/FIX9BXWF3JESWI5-j.webp

Piv Txwv Kev Siv
Piv Txwv Kev Siv

Parameter (1/2) "src =" https://content.instructables.com/ORIG/FHZ/92ZS/F3JESWI7/FHZ92ZSF3JESWI7-j.webp

Xaus: Sau Ntawv Kawg
Xaus: Sau Ntawv Kawg

Parameter (1/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (1/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (1/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (1/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (1/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} "> Qhov tom ntej no me ntsis tsis yog tiag 'command,' tab sis theej ntxiv syntax rau lwm Nws ua dab tsi yog nws siv qhov Output ntawm qee cov lus txib, thiab tuaj yeem sau nws mus rau hauv Text file. Nws yooj yim piav qhia yog tias koj pom nws hauv kev ua ua ntej. Nws cov syntax yog:

Command> FilenameOk, yog li cia peb hais tias peb nyob hauv qee cov npe. Peb tom qab ntawd siv DIR Command, uas, yog tias koj nyeem Basics of Batch, koj yuav paub raws li qhia cov ntsiab lus ntawm koj cov npe tam sim no

C: / Users / Neo \> DIRYuav nquag tso tawm

Volume hauv tsav C yog HP Volume Serial Number yog BC7E-E26C Cov Npe ntawm C: Cov Neeg Siv Neo2007-30-06 11:14 AM.2007-30-06 11:14 AM..2007-17-03 06:41 PM.idlerc2007-19-02 03:14 PM Contacts2007-19-06 10:44 PM Desktop2007-29-06 08:47 AM Cov Ntaub Ntawv2007-19-06 10:35 AM Downloads2007-19-02 03:14 PM Favorites02/19/ 2007 03:14 PM Links2007-12-05 04:01 PM Music2007-30-06 01:20 AM Duab 2007-07-04 03:08 PM Saved Games2007-19-02 03:14 PM Nrhiav2007-01-03 07:23 PM 242, 947 Test Record.wma2007-19-06 10:39 AM Videos2007-18-06 09:57 AM 1, 324, 574 wp_screenprint_mc.pdf2007-18-06 09:59 AM 73, 996, 533 wp_tshirt_full.mp4 4 Cov ntaub ntawv 75, 564, 054 bytes 14 Dir (s) 132, 927, 537, 152 bytes dawbTab sis, yog tias peb ntxiv> thiab rau nws

C: / Users / Neo / DIR> DIRContents.txtPeb tsis tau txais qhov tso tawm, tab sis hloov pauv, peb tau txais cov npe-spankin'-tshiab Cov Ntawv Cov Ntaub Ntawv hu ua DIRContents.txt uas muaj cov ntawv tso tawm hauv nws! Tab sis tos, muaj teeb meem! Kuv xav kom muaj ntau qhov tawm hauv tib cov ntaub ntawv, tab sis kuv> tsuas yog khaws cia nws rov qab, thiab tsis ntxiv nws! Kuv ua dab tsi?

Kauj Ruam 10: >> Parameter (2/2)

Parameter (2/2) "src =" https://content.instructables.com/ORIG/FG4/B58B/F3JESWIJ/FG4B58BF3JESWIJ-j.webp

Parameter (2/2) "src =" https://content.instructables.com/ORIG/F05/GZB1/F3JESWIK/F05GZB1F3JESWIK-j.webp

Parameter (2/2) "src =" https://content.instructables.com/ORIG/F93/Q7VS/F3JESWL2/F93Q7VSF3JESWL2-j.webp

Parameter (2/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (2/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (2/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (2/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (2/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} ">

Parameter (2/2) "src =" {{file.large_url | ntxiv: 'pib = webp & thav duab = 1 & qhov siab = 300' %} "> Zoo kuv zoo siab koj nug. Qhov ntawd yog >> Parameter yog rau! >> zoo ib yam li>, tab sis hloov tag nrho cov ntawv tshwj xeeb, peb ntxiv rau nws! Yog li cia peb sim nws.

DIR >> DIRContents.txtNeat! Ua Haujlwm Zoo Kawg! Yog li tos. Qhov ntawd txhais tau tias kuv tuaj yeem sau txhua yam kuv xav tau rau hauv cov ntawv nyeem? Kuv xav sim nws

Batch Yog Txaus> Awesome.txtDab tsi? Vim li cas ho tsis ua haujlwm? Nws yog vim qhov ntsuas tsuas yog sau qhov ua tau ntawm Kev Hais Kom Ua Raws Cai, tsis yog txhua yam uas koj ntaus ntawv. Tab sis, qhov no yog teeb meem uas yooj yim daws. Nco ntsoov, qhov ntsuas tsis pub dhau ntawm Cov Lus Hais. Cov lus txib twg muaj qhov tso tawm uas peb tuaj yeem tswj tau? Txoj cai! ECHO Command

ECHO Batch Is Awesome> Awesome.txtECHO Kuv & aposm zoo siab heev uas kuv paub nws. >> Awesome.txtYay! Nco ntsoov. Qhov >> ntxiv Cov Lus Qhia rau kab tom ntej ntawm cov ntawv.

Kauj Ruam 11: Piv Txwv Kev Siv

Ok. Yog li cia peb muab nws tso ua ke! Nov yog qee qhov qauv piv txwv kuv tau ua uas siv cov lus txib uas kuv tau qhia rau koj hauv cov lus qhia no. Qhov chaws no yuav ntxiv 1 mus rau qhov sib txawv tsis tu ncua, thiab tso tawm cov txiaj ntsig tas mus li.

@ECHO OFFSET /tus lej = 1: Rov ua duaECHO%num%SET /tus lej =%num%+1GOTO Rov Ua DuaTxoj cai no yuav pib CMD.exe 5 zaug

@ECHO OFFSET /a RepeatNum = 5: OpenIF%RepeatNum%== 0 GOTO EndSTART CMD.exeSET /a RepeatNum =%RepeatNum%-1GOTO Qhib: XausTxoj cai no yuav tsim cov ntawv ua pawg hauv C: / Users / Neo, thiab yuav khiav nws

@ECHO OFFCHDIR C: / Users / NeoECHO @ECHO OFF> Hello.batECHO ECHO Nyob zoo! >> Hello.batECHO ECHO Kuv & aposm hauv koj C Drive! >> Hello.batECHO PAUSE >> Hello.batC: / Users / Neo / Hello. puavNov yog qhov kev ua si me ntsis. Koj yuav tsum kwv yees tus lej

@ECHO OFFSET /a GuessNum = 0SET /a Answer =%RANDOM%ECHO Guess What Number I & aposm thinking of.:RetrySET /p Guess = IF%Guess%LSS%Answer%ECHO Kuv tus lej yog siab dua. IF%kwv yees%GTR%Teb %ECHO Kuv Tus Xov Tooj Qis. IF%Guess%==%Teb%GOTO ENDECHO. SET /a GuessNum =%GuessNum%+1GOTO Rov Qab: ENDECHO Koj hais raug lawm! Cov Lus Teb yog %Teb %ECHO Nws siv %GuessNum %Guesses. ECHO. PAUSEThiab qhov no, kuv nyiam heev. Yog tias koj tsis ceev faj, txawm li cas los xij, nws tuaj yeem tawm ntawm tes ncaj ncees, nyob ntawm koj lub computer lub peev xwm. Cov ntaub ntawv no ua dab tsi yog nws tas mus li tsim cov lej cov ntawv hauv cov npe hu ua lolnumbers. Txhua ntawm cov ntawv no muaj DIR ntawm lolnumbers phau ntawv teev npe. Qhov yog, phau ntawv teev npe tas li tau txais puv thiab puv nrog cov ntawv cov ntawv, yog li txhua kab ntawv sib txuas ua ke loj dua qhov kawg. Qhov tshwm sim ntawm qhov no yog daim nplaub tshev uas nws qhov loj me tau loj dua thiab loj dua txhua ob

@ECHO OFFSET /tus lej = 1MKDIR lolnumbersCD lolnumbers: RestartDIR>%num%.txtSET /a num+= 1GOTO RestartCov no yog cov lej yooj yim yooj yim. Sim nrog lawv rau koj lub siab cov ntsiab lus.

Kauj Ruam 12: Xaus: Sau Ntawv Kawg

Phaw. Peb tau npog ntau yam hauv qhov kev qhia no. Qhov no yog, tsis raug, 3 zaug ntev dua li kuv qhov kawg. Kuv vam tias koj yuav nyiam nws! Tsuas yog qee qhov kev ceeb toom ua ntej kuv mus. Nco ntsoov: Thaum SETing qhov sib txawv, Tsis txhob tso qhov chaw nruab nrab ntawm qhov sib txawv thiab nws tus nqi. YES:

SET hloov pauv 1 = Tus nqiQhov chaw ntxiv yuav ua rau koj qhov sib txawv kom tsis muaj qhov tsis muaj

SET hloov pauv 1 = Tus nqiNtxiv thiab, ntau yam IFs. Nco ntsoov los teeb cov kab lus kom raug: YOG

YOG 1 == 1 (ECHO Ib Leeg Ib Qhov!)TSIS YOG

YOG 1 == 1 (ECHO Ib Leeg Ib Qhov!)Tsis tas li, muaj qhov hloov pauv hauv ib yam nkaus

%CD %% DATE %% TIME %% RANDOM%% CD% Nthuav mus rau cov npe tam sim no. Yeej, txoj hauv kev tom qab thawj>% DATE% thiab% TIME% yog Hnub Tim thiab Sijhawm.% RANDOM% muab tus lej tsis sib xws ntawm 0 thiab 32767. Qhov hloov pauv tsis tau, kuv tsis xav thiab qhov ntawd yog qhov pib! Kuv vam tias koj txaus siab rau cov lus qhia no, Kuv ua haujlwm tiag tiag rau nws. Kuv yuav muaj teeb meem me ntsis los teb cov lus nug hauv ob peb lub hlis tom ntej, vim tias kuv yuav tawm ntawm Lub Tebchaws. Tab sis yog tias koj muaj lus nug, tsuas yog tawm lus rau leej twg. Yog tias kuv nkag tau mus rau lub khoos phis tawj, kuv yuav nco ntsoov teb, tab sis kuv tsis xav tias yuav tsim nyog; Cov lus qhia yog zej zog phooj ywg, thiab Kuv Paub tseeb tias muaj ib tus neeg nyob ntawd yuav pab koj hauv koj qhov xwm txheej.

Pom zoo: