Hangata, litlhahiso tsa ho etsa lintho le litokisetso ho Windows 10, 8, le Windows 7 li kenyelletsa mehato e kang: "bopa file e .bat ka lintho tse latelang ebe u li tsamaisa." Leha ho le joalo, mosebeletsi oa mochine oa kamehla ha a tsebe ho etsa sena le hore na faele e emela eng.
Thuto ena e hlalosa mokhoa oa ho bopa faele ea litaelo ea bat, e tsamaise, le boitsebiso bo bong bo eketsehileng bo ka thusang moelelong oa sehlooho ka potso.
Ho theha faele ea .bat ka kopo
Tsela ea pele le e bonolo ka ho fetisisa ea ho etsa faele ea bat, ke ho sebelisa lenaneo la kopo la Notepad, le fumanehang liphetolelong tsohle tsa hona joale tsa Windows.
Mehato ea pōpo e tla ba ka tsela e latelang.
- Qala li-Notepad (tse fumanehang Lenaneong - Lisebelisoa, ho Windows 10 li potlakile ho qala ka ho batlisisa kahare ea konteraka, haeba ho se na buka ea pele ho menu, u ka e qala ho C: Windows notepad.exe).
- Kena ka lebokoseng la khoutu ea bat file ea hau (ka mohlala, kopitsa ho tsoa kae-kae, kapa u ngolle, ka litaelo tse ling - ho feta litaelo).
- Lenaneng la li-notepad, khetha "File" - "Save As", khetha sebaka ho boloka faele, hlalosang lebitso la fono le extension .bat le, ka ho hlakileng, "Mofuta oa Feshene" o behile "Lifahleho tsohle".
- Tobetsa "Boloka."
Tlhokomeliso: haeba faele e sa bolokehe sebakeng se boletsoeng, mohlala, ho khanna C, le molaetsa "Ha u na tumello ea ho boloka lifaele sebakeng sena", u li boloke ho Folda ea Litokomane kapa ho desktop, ebe ue kopitsa sebakeng seo u se batlang ( Lebaka la bothata ke hore ho Windows 10, o hloka litokelo tsa batsamaisi ho ngolla li-folders tse ling, 'me kaha Notepad e ne e sa sebetse e le motsamaisi, a ke ke a boloka faele ea fensetereng e boletsoeng).
Faele ea hau ea .bat e se e loketse: ha u qala, litaelo tsohle tse thathamisitsoeng lefapheng lena li tla etsoa ka boomo (ho nka hore ha ho na liphoso le litokelo tsa tsamaiso tse hlokehang: maemong a mang, u ka 'na ua lokela ho matha faele ea batlatsi e le motsamaisi: tobetsa ka ho le letona ho file .bat mookameli molaong oa moelelo).
Tlhokomeliso: nakong e tlang, haeba u batla ho fetola faele e bōpiloeng, feela tobetsa ho eona ka konopo e nepahetseng ea mouse mme khetha "Edit".
Ho na le litsela tse ling tsa ho etsa faele ea bat, empa kaofela ba pheha ho ngola litaelo taelo e le 'ngoe ka mohala ho faele ea mongolo ho mohlophisi ofe kapa ofe oa sebopeho (ntle le mokhoa oa ho fetola), o bolokiloeng ka extension ea .bat (mohlala, ho Windows XP le 32-bit Windows 7, o ka ba ua bopa faele ea .bat ka taelo ea molaetsa o sebelisa mongolo oa litlhaku (fetola).
Haeba u na le ponts'o ea li-extensions tse fuoeng matla (liphetoho ho khetho ea tsamaiso - likhetho tsa mofuputsi - sheba - pata lisebelisoa tsa mefuta e ngolisitsoeng ea mefuta), joale o ka bopa faele ea .txt, ebe o renama file hape ka ho beha extension ea .bat.
Tsamaisa mananeo ho faele ea bat le melao e meng ea motheo
Ka faele ea batch, o ka matha mananeo ohle le litaelo tse tsoang lethathamong lena: //technet.microsoft.com/ru-ru/library/cc772390(v=ws.10).aspx (le hoja tse ling tsa tsona li ka 'na tsa haelloa ke Windows 8 le Windows 10). Ho feta moo, ke boitsebiso bo itseng ba motheo ba basebelisi ba li-novice.
Mesebetsi e tloaelehileng ka ho fetisisa ke ena: ho qala lenaneo kapa mananeo a 'maloa ho tloha ho filebat, ho qala mosebetsi o mong (ka mohlala, ho tlosa lebokose la lipapali, ho fana ka Wi-Fi ho laptop, ho koala k'homphieutha ka nako).
Ho tsamaisa lenaneo kapa mananeo sebelisa taelo:
qala "" path_to_program
Haeba tsela e na le libaka, nka tsela eohle ka litlhaloso tse peli, mohlala:
qala "" "C: Program Files program.exe"
Ka mor'a tsela ea lenaneo, u ka boela ua bolela hore na o lokela ho sebetsa joang, ka mohlala (joalo-joalo, haeba mekhahlelo ea lits'ebeletso e na le libaka, li behe liqotsong):
qala "" c: windows notepad.exe file.txt
Tlhokomeliso: ka litlhaloso tse peli tse qalang, qalang e tlameha ho kenyelletsa lebitso la faele ea taelo e bontšitsoeng molaong oa molaetsa oa taelo. Mohlala ona ke oa boikhethelo, empa ha ho se na litemana tsena, ho hlajoa ha lifaele tse nang le litemana litseleng le mekhahlelo li ka tsamaea ka tsela e sa lebelloang.
Ntho e 'ngoe e bohlokoa ea ho hlahisa faele e' ngoe ea bat ho tloha faele ea hona joale, sena se ka etsoa ho sebelisa taelo ea mohala:
letsetsa tsela_file_bat lipampiri
Mekhahlelo e fetisitsoeng qalong e ka baloa ka hare ho faele e 'ngoe ea bat, ka mohlala, re bitsa faele ka meeli:
call file2.bat parameter1 parameter2 parameter3
Ka file2.bat, u ka bala mekhahlelo ena mme u e sebelise e le litsela, mekhahlelo ea ho sebelisa mananeo a mang ka tsela e latelang:
echo% 1 echo% 2 echo% 3 khefu
Eena bakeng sa parameter e 'ngoe le e' ngoe eo re e sebelisang ka lipalo tsa eona ka pontšo ea lekholong. Phello ho mohlala o boletsoeng ka holimo o tla hlahisa mehato eohle e fetisetsoang fensetereng ea litaelo (taelo ea echo e sebelisetsoa ho bonts'a molaetsa fensetereng ea console).
Ka ho feletseng, fensetere ea litaelo e koala kapele ka mor'a ho phethahala ha litaelo tsohle. Haeba o hloka ho bala tlhahisoleseding ka hare ho fensetere, sebelisa taelo ea khefu - e tla emisa ho phethahatsoa ha litaelo (kapa koala fensetere) pele o hatella ntho leha e le efe ea bohlokoa ka console ka mosebedisi.
Ka linako tse ling, pele u phetha taelo e latelang, u lokela ho leta nako e itseng (mohlala, pele lenaneo la pele le qalile). Ho etsa sena, o ka sebelisa taelo:
nakotime / t nako_e metsotsoana
Haeba o lakatsa, o ka tsamaisa lenaneo ka mokhoa o fokolitsoeng kapa video e atolositsoeng u sebelisa mekhahlelo ea MIN le MAX pele u hlalosa lenaneo ka boeona, mohlala:
qala "" / MIN c: windows notepad.exe
Ho koala fensetere ea taelo ka mor'a hore litaelo tsohle li phethoe (le hoja hangata li koala ha u sebelisa qala ho qala), sebelisa taelo ea ho tsoa motseng oa ho qetela. Haeba console e ntse e sa koale ka mor'a ho qala lenaneo, leka ho sebelisa taelo ena:
cmd / c qalong / b "" tsela_to_programme mekhahlelo
Tlhokomeliso: taelong ena, haeba lenane la litsela kapa mekhahlelo e na le libaka, ho ka 'na ha e-ba le mathata a hlahang, a ka rarolloang ka tsela ena:
cmd / c qale "" / d "path_to_folder_with_spaces" / b program_file_name "mekhahlelo_with_paces"
Joalokaha ho se ho boletsoe, sena ke boitsebiso ba motheo feela bo mabapi le litaelo tse sebelisoang hangata ka lifaele tsa bat. Haeba o hloka ho etsa mesebetsi e eketsehileng, leka ho fumana boitsebiso bo hlokahalang ho Internet (sheba, mohlala, "etsa ntho e itseng molaong oa taelo" 'me u sebelise litaelo tse tšoanang ka filebat .bat kapa u botse potso litlatsong, ke tla leka ho thusa.