Pulogalamu ya Zona: mavuto ndi kukhazikitsidwa

BAT - mafayilo a batch omwe ali ndi maselo amodzi pofuna kupanga zochita zina mu Windows. Ikhoza kuyendetsa imodzi kapena kangapo malinga ndi zomwe zili. Wogwiritsa ntchito amafotokozera zomwe zili m'dongosolo la batch pokhapokha - zilizonse, izi ziyenera kukhala malemba omwe DOS akuthandizira. M'nkhaniyi tidzakambirana za kulengedwa kwa fayiloyi m'njira zosiyanasiyana.

Kupanga fayilo ya BAT mu Windows 10

Mu mawindo onse a Windows OS, mukhoza kupanga mafayilo a batch ndikugwiritsa ntchito kugwira ntchito ndi zolemba, zolemba kapena deta zina. Mapulogalamu a anthu achitatu sali oyenera pa izi, popeza Windows iwowo amapereka mwayi wonse wa izi.

Samalani pamene mukuyesera kupanga BAT ndi zosadziwika komanso zosamvetseka. Mafayi amenewa akhoza kuvulaza PC yanu pogwiritsa ntchito kachilombo, wofunkha kapena kakompyuta pamakompyuta. Ngati simukudziwa kuti malamulowa ali ndi chiani, choyamba mudziwe tanthauzo lake.

Njira 1: Notepad

Kupyolera mu ntchito yachikale Notepad mumatha kupanga ndi kudzaza BAT ndi malamulo oyenera.

Zosankha 1: Yambani Notepad

Njirayi ndi yofala kwambiri, choncho yambiranani.

  1. Kudzera "Yambani" kuthamanga mawindo omangidwa Notepad.
  2. Lowani mizere yofunikira, mutayang'ana molondola.
  3. Dinani "Foni" > Sungani Monga.
  4. Choyamba sankhani zolemba kumene fayilo idzasungidwe kumunda "Firimu" mmalo mwa asterisk, lowetsani dzina loyenera, ndikusintha zowonjezereka pambuyo pa dontho kuti lisinthe .txt on .bat. Kumunda "Fayilo Fayilo" sankhani kusankha "Mafayi Onse" ndipo dinani Sungani ".
  5. Ngati pali zilembo za Chirasha muzolemba, encoding pakupanga fayilo iyenera kukhala "ANSI". Apo ayi, mmalo mwa iwo, mu Lamulo la Lamulo mudzapeza malemba osawerengeka.
  6. Fayilo ya batch ikhoza kuthamanga ngati fayilo yowonongeka. Ngati mulibe malamulo m'zinthu zomwe zimagwirizana ndi wogwiritsa ntchito, mzere wa lamulo umawonetsedwa kwachiwiri. Apo ayi, zenera lake lidzatsegulidwa ndi mafunso kapena zochita zina zomwe zimafuna yankho kuchokera kwa wogwiritsa ntchito.

Njira 2: Menyu Yokambirana

  1. Mukhozanso kutsegula makalata omwe mukukonzekera kusunga fayilo, pindani pomwepo pa malo opanda pake, ndikuwonetsani "Pangani" ndipo sankhani kuchokera mndandanda "Text Document".
  2. Apatseni dzina lofunika ndikusintha zowonjezera pambuyo pa dontho kuti .txt on .bat.
  3. Chenjezo lovomerezeka liwoneke posintha kusintha kwa fayilo. Vomerezani naye.
  4. Dinani pa fayilo ya RMB ndi kusankha "Sinthani".
  5. Fayilo idzatsegulidwa mu Notepad yopanda kanthu, ndipo kumeneko mukhoza kuzisunga pa luntha lanu.
  6. Anatha kupyolera "Yambani" > Sungani " pangani kusintha konse. Kwa cholinga chomwecho, mungagwiritse ntchito njira yachinsinsi Ctrl + S.

Ngati muli ndi Notepad ++ yoikidwa pa kompyuta yanu, ndi bwino kuigwiritsa ntchito. Kugwiritsa ntchitoku kukuwonetseratu mawu omasulira, kuti zikhale zosavuta kugwira ntchito ndi kulengedwa kwa malamulo. Pamwamba pazithunzi pali mwayi wosankha encoding ya Cyrillic ("Makalata" > "Cyrillic" > "OEM 866"), popeza ANSI ya ena ikupitirizabe kusonyeza krakozyabry mmalo mwa malembo ovomerezeka omwe analembedwera ku Russia.

Njira 2: Lamulo Lolamulira

Kupyolera mu zotonthoza, popanda mavuto, mukhoza kupanga BAT yopanda kanthu kapena yodzaza, yomwe idzadutsamo.

  1. Tsegulani Lamulo Lamulo mwanjira iliyonse yabwino, mwachitsanzo, kudzera "Yambani"polemba dzina lake pakufufuza.
  2. Lowani timukoperani con c: lumpics_ru.batkumene kopanikizana - gulu lomwe lidzapange chikalata cholemba c: - fayilo yopulumutsa mafayilo lumpics_ru - fayilo dzina, ndi .bat - Kukula kwa chikalata cholemba.
  3. Mudzawona kuti chithunzithunzi chopukuta chasunthira ku mzere pansipa - apa mungathe kulemba malemba. Mukhozanso kusunga fayilo yopanda kanthu, ndi kupeza momwe mungachitire izi, pita ku sitepe yotsatira. Komabe, kawirikawiri ogwiritsa ntchito amalowetsa malamulo oyenera kumeneko.

    Ngati mutalowa mwatsatanetsatane pamanja, pitani ku mzere uliwonse watsopano ndi makina odule. Ctrl + Lowani. Pamaso pa malamulo omwe anakonzedwa kale ndi okopera, dinani pomwepo pa malo opanda kanthu ndipo zomwe zili pa bolodi la zojambulajambula zidzalowetsedwa mosavuta.

  4. Kuti muzisunga fayilo, gwiritsani ntchito mgwirizano wachinsinsi Ctrl + Z ndipo dinani Lowani. Kukanikiza kwawo kudzawonetsedwa muzithunzithunzi monga momwe zasonyezera pa skrini pansipa - izi ndi zachilendo. Mu fayilo ya batch, mawonekedwe awiriwa sadzawonekera.
  5. Ngati chirichonse chikuyenda bwino, mudzawona chidziwitso mu Lamulo Lamulo.
  6. Kuti muwone kulondola kwa fayilo yokonzedwa, yendani ngati fayilo ina iliyonse yochitidwa.

Musaiwale kuti nthawi iliyonse mungasinthe mazenera a batch powasindikiza ndi batani lamanja la mbewa ndikusankha chinthucho "Sinthani", ndi kupulumutsa, pezani Ctrl + S.