Cov txheej txheem:
- Kauj ruam 1: DIR Command
- Kauj ruam 2: CD thiab CHDIR Commands
- Kauj ruam 3: COPY thiab XCOPY
- Kauj ruam 4: DEL Command
- Kauj Ruam 5: Tsim Batch File
Video: Cov hauv paus ntawm Cov Ntaub Ntawv Batch: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Yog tias koj muaj lus nug dab tsi, thov tso lawv rau ntawm kuv qhov BLOG: https://tamsanh.com/blog/2008/07/10/batch-tutorial-1-basics-of-batch-files/Kuv tsis mus saib Instructables ntxiv lawm, yog li koj yuav tau txais cov lus teb sai dua li ntawd. Ntawm no yog cov hauv paus ntawm Batch cov ntaub ntawv, tshwj xeeb tau ua rau pab pawg "Batch Lovers" Cov pawg yog cov ntaub ntawv me me uas khiav DOS cov lus txib hauv qee qhov kev xaj khoom. Qhov no muaj txiaj ntsig zoo rau kev ua yooj yim, tab sis ib qho yuav tsum nco ntsoov nws tsis yog hom lus programming, thiab tsis tuaj yeem ua Txhua Yam. cov ntawv qhia zaub mov thiab ntaus hauv CMD. PSI
Kauj ruam 1: DIR Command
DIR hais kom ua yog ib qho ntawm cov lus txib muaj txiaj ntsig zoo tshaj plaws uas ib tus tuaj yeem siv. Thiab, rau cov neeg siv tshiab, nws zoo li haxxor, vim tsis muaj lo lus zoo dua. = D. What qhov lus txib ua yog nws qhia txog DIRectory, lub ntsiab lus tag nrho cov ntaub ntawv, thiab tag nrho cov ntawv tais ceev tseg uas muaj nyob hauv qee cov npe. Qhov no suav nrog TXHUA cov ntaub ntawv, tsis muaj teeb meem yog tias lawv tau muab zais, lossis nyeem nkaus xwb, lossis xijpeem, DIR yuav qhia txhua tus ntawm lawv. Nws tseem yuav qhia lub cim xeeb los ntawm phau ntawv teev npe, thiab lub cim xeeb pub dawb. Txawm hais tias tom kawg raug txiav tawm ntawm daim duab los qhia cov lus txib uas tau siv. Los ntawm kev siv DIR hais kom ua, peb tuaj yeem pom cov ntaub ntawv, thiab cov ntawv tais ceev tseg uas peb yuav xav siv yav tom ntej nrog lwm cov lus txib.
Kauj ruam 2: CD thiab CHDIR Commands
CD thiab CHDIR Commands yog cov lus txib uas yuav coj koj mus qhov twg koj xav mus! Tab sis vim li cas ob lo lus txib sib txawv?
Cia kuv piav! CD hais kom siv los ntawm ib qho mus rau ib qho chaw sib cais kiag li. Lub ntsiab lus tsis yog subfolder, lossis niam txiv daim nplaub tshev. Txhawm rau siv CD cov lus txib, ib tus yuav tsum sau tag nrho qhov chaw nyob ntawm phau ntawv teev npe uas koj xav mus ntsib. I. E.: CD C: / Cov Ntaub Ntawv thiab Cov Chaw / Neo / Kuv Cov Ntaub Ntawv coj kuv mus rau kuv li My Documents nplaub tshev hauv ib kauj ruam nrawm. CHDIR cov lus txib tau siv kom mus txog qhov chaw ze los ntawm yam tsis tas yuav ntaus tus lej chaw nyob tas mus li. I. E.: CHDIR Kuv Lub Suab Nkauj Coj kuv mus rau kuv phau ntawv teev suab paj nruag. Yog tias kuv yuav siv CD, Kuv yuav tsum tau ntaus CD C: / Cov Ntaub Ntawv thiab Chaw> Neo / Kuv Cov Ntaub Ntawv / Kuv Lub Suab Nkauj Thiab qhov ntawd tuaj yeem ua rau muaj kev ntxhov siab tom qab ib ntus. tab sis yuav ua li cas thiaj li nce ib daim nplaub tshev nrog CHDIR? Koj yooj yim ntxiv ob lub sijhawm tom qab CHDIR hais kom ua, thiab nws yuav coj koj mus! CHDIR.. Yog li, nrog CD thiab CHDIR, koj lub khoos phis tawj tuaj yeem tshawb xyuas kom ntxaws, thiab yooj yim! Thiab thaum ua ke nrog DIR hais kom ua, tsis muaj dab tsi zais! Kho kom raug: Kuv nyuam qhuav pom tias CHDIR hais kom peb ua tsis tiav, thiab daim CD hais kom tuaj yeem siv nkag mus rau cov ntawv tais ceev tseg, thiab niam txiv cov ntawv yooj yim. Tab sis txij li qhov no yuav tsis muaj tseeb ntawm cov tshuab qub, kuv tseem yuav khaws CHDIR hais kom ua!
Kauj ruam 3: COPY thiab XCOPY
COPY thiab XCOPY ua raws nraim qhov koj xav. Lawv Luam cov khoom! Yay!
COPY hais kom ua yog siv rau kev luam cov ntaub ntawv. COPY "FILE PATH" "DESTINATION PATH" I. E. Luam "C: / test.txt" "C: / Test / test.txt" Cov lus hais los saum no yuav luam cov ntawv test.txt los ntawm C: / rau C: / Test nplaub tshev. XCOPY hais kom ua yuav luam cov ntawv lawv tus kheej tib yam li COPY saum toj no. I. E. XCOPY "C: Test" "C: Test Test Copy" Cov lus hais los saum toj no yuav luam theej tawm daim nplaub tshev mus rau Test Copy folder. Txawm li cas los xij, daim ntawv theej theej tawm tsis suav nrog cov subfolders tshwj tsis yog koj ntxiv cov lus txib /S mus rau qhov kawg. Tsis tas li, yog tias phau ntawv qhia chaw tseem tsis tau tsim tam sim no, nws yuav nug seb nws puas yog Cov Ntaub Ntawv lossis Cov Npe Xaiv Cov Ntawv Teev Npe Yooj yim yog?
Kauj ruam 4: DEL Command
Ua oh. Qhov txaus ntshai DEL hais kom ua!
Kwv yees cov lus txib no ua dab tsi! I. E. DEL "C: / Test / Test.txt" Qhov ntawd yuav tshem tawm cov ntawv xeem tsis zoo uas peb tau siv. Nco tseg, Kev hais kom Del yuav tsis xav tau tag nrho cov ntawv hauv kab ntawv, tsuav yog cov ntawv koj tab tom rho tawm yog nyob hauv daim nplaub tshev uas koj nyob. Ua tib zoo nrog cov lus txib no, vim tias DEL hauv DOS lub qhov rai hais kom ua dhau los ntawm Recycle Bin, thiab cov ntaub ntawv nyuaj dua los khaws. Thiab nws tsis muab rau koj ib qho kev pom zoo ntawm koj kev tshem tawm, raws li koj tuaj yeem pom hauv daim duab.
Kauj Ruam 5: Tsim Batch File
Ok, yog li peb tau npog cov hauv paus ntawm DOS Command window, tab sis peb tuaj yeem tsim daim Batch li cas?
Zoo kuv zoo siab heev koj tau nug lo lus nug, vim qhov ntawd yog qhov peb tab tom sim npog! Batch cov ntaub ntawv tsuas yog Cov Ntawv Cov Ntaub Ntawv nrog kev hloov pauv hloov mus rau.bat Cov khoom yooj yim tiag tiag. Tsuas yog qhib cov ntawv sau, ntaus koj cov lus txib, thiab khaws nws ua.bat! Tada! Koj tau ua koj thawj daim ntawv ua tiav! Yog li koj tuaj yeem ua dab tsi nrog cov ntawv me me no? Zoo qhov kuv nyiam siv yog lub flash drive syncing yam tsis muaj txhua qhov software vwm! Nov yog cov lus txib kuv siv: XCOPY "E: \" "C: / Documents and Settings / Neo / My Documents / Flash Drive" /S Qhov no yuav luam tawm txhua cov ntaub ntawv tawm ntawm kuv lub flash drive, uas yog ib txwm E: /, suav nrog subfolders, txoj cai rau hauv Kuv Cov Ntaub Ntawv/Flash Drive, yog li ua kom txhua yam ntawm kuv cov ntaub ntawv tau rov qab sai! Qhov zoo tshaj plaws, cov pob tuaj yeem nqa nrog koj sab xis hauv koj lub flash drive, yog li koj tuaj yeem rov qab tau txhua qhov chaw koj ntsaws! Zoo nkauj dandy eh? Tab sis ntawm chav kawm, peb tseem tsis tau khawb qhov saum npoo ntawm cov ntaub ntawv batch tsis tau. Kuv yuav qhia koj cov lus zais ntawm kev lag luam hauv Batch Tom ntej Qhia ntawm no hauv Batch Lover's pab pawg! ~ tso ~
Pom zoo:
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): 3 Cov Kauj Ruam
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): Peb txhua tus nyiam ua si nrog peb tus lej L … cov ntsiab lus tau ntxiv thiab nws tsis tshwj xeeb rau lub qhov muag. Arduino IDE cov phiaj xwm tsis
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card - DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: 5 Cov Kauj Ruam
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card | DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: Taw qhia: nyob zoo, qhov no yog Liono Maker, ntawm no yog YouTube txuas. Peb tab tom tsim txoj haujlwm muaj tswv yim nrog Arduino thiab ua haujlwm ntawm cov kab ke. Cov ntaub ntawv-Logger: Cov ntaub ntawv logger (tseem cov ntaub ntawv-logger lossis cov ntaub ntawv kaw) yog cov cuab yeej siv hluav taws xob uas sau cov ntaub ntawv dhau sijhawm
Txoj hauv kev zoo dua los Saib/Ntaub Ntawv Cov Ntaub Ntawv ntawm Cov Lus Qhia: 4 Cov Kauj Ruam
Txoj hauv kev zoo dua los Saib/Cov Ntaub Ntawv ntawm Kev Qhia: Tib neeg feem ntau suav nrog cov ntaub ntawv rau qhov haujlwm ntawm Instructables upload.Ua ntej qhov no yog software cov ntaub ntawv cov ntaub ntawv uas tej zaum tseem yuav yog lub plawv dhia ntawm kev qhia. Tab sis Instructables tsis muab txoj hauv kev rau tus nyeem yooj yim nyeem thiab tshuaj xyuas cov cai. (
RAWS LI COV NTAUB NTAWV NTSEEG NTAWV NTAWV MUAJ NTAWV TSHUAJ NTAWV TSO CAI RAU RASPBERRY PI: 6 Kauj Ruam (nrog Duab)
RAWS LI COV NTAUB NTAWV NTAWV MUAJ NTAWV TSHUAJ NTXIV RAU RASPBERRY PI: Hauv qhov haujlwm no, peb yuav txuas peb ntawm Atlas Scientific's EZO sensors (pH, yaj cov pa thiab kub) mus rau Raspberry Pi 3B+. Hloov chaw ntawm txuas cov kab hluav taws xob mus rau Raspberry Pi, peb yuav siv Whitebox Labs Tentacle T3 daim ntaub thaiv. T
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: Lub Hom Phiaj: Txhim kho cov cuab yeej cuab tam thiab rov ua dua cov ntsiav kom ntxig USB Ethernet CDC Gadget txhawb nqa; Rov tsim boot.img los ntawm Linaro rau khau raj USB Ethernet CDC; Tsim NFS server los tuav lub hauv paus cov ntaub ntawv system; IP teeb tsa hauv DEVICE thiab HOST