fbpx
วิกิพีเดีย

COMMAND.COM

ระวังสับสนกับ cmd.exe

COMMAND.COM เป็นอินเทอร์พรีเตอร์บรรทัดคำสั่งปริยายสำหรับระบบปฏิบัติการดอส วินโดวส์ 95 วินโดวส์ 98 และวินโดวส์มี และเป็นส่วนติดต่อผู้ใช้ปริยายในดอส โดยมีหน้าที่เพิ่มเติมคือตั้งค่าระบบโดยเรียกใช้ไฟล์การกำหนดค่า AUTOEXEC.BAT เมื่อโปรแกรมแรกเริ่มทำงานหลังจากบูตระบบ รวมถึงทำหน้าที่เป็นต้นกำเนิดของกระบวนการทั้งหมดด้วย COMMAND.COM รุ่นใหม่บนระบบปฏิบัติการโอเอส/2 และวินโดวส์เอ็นทีจะเป็น cmd.exe ถึงแม้ว่า COMMAND.COM จะพร้อมใช้งานบนระบบปฏิบัติการเหล่านั้นซึ่งเป็นรุ่น IA-32 ก็ตาม

COMMAND.COM เป็นโปรแกรมดอส โปรแกรมที่เรียกใช้จาก COMMAND.COM จะเป็นโปรแกรมดอสที่ใช้ MS-DOS API ในการสื่อสารข้อมูลกับระบบปฏิบัติการ (ดอส)

โหมดการทำงาน

COMMAND.COM มีโหมดการทำงานอยู่ด้วยกันสองโหมดในรูปแบบเชลล์ โดยโหมดแรกจะเป็นโหมดแบบโต้ตอบ ซึ่งสำหรับดำเนินการคำสั่งที่ผู้ใช้พิมพ์โดยทันที โหมดที่สองจะเป็นโหมดแบบกลุ่ม ซึ่งดำเนินการลำดับคำสั่งที่กำหนดไว้ล่วงหน้าซึ่งถูกเก็บไว้เป็นไฟล์ข้อความที่มีนามสกุลไฟล์ .BAT

คำสั่งภายใน

คำสั่งภายในเป็นคำสั่งที่บรรจุไว้ภายในไบนารีของ COMMAND.COM โดยตรง ซึ่งพร้อมใช้งานตลอดเวลา แต่สามารถเรียกใช้ได้เพียงจากอินเทอร์พรีเตอร์คำสั่งโดยตรงเท่านั้น

คำสั่งทั้งหมดจะถูกดำเนินการหลังจากกดปุ่ม ↵ Enter ที่ท้ายบรรทัดคำสั่ง โดยคำสั่งใน COMMAND.COM จะไม่คำนึงถึงตัวอักษรพิมพ์ใหญ่-เล็ก หมายความว่าสามารถพิมพ์คำสั่งได้โดยจะเป็นตัวพิมพ์ใหญ่หรือตัวพิมพ์เล็กก็ได้

BREAK
ควบคุมการจัดการการขัดจังหวะการทำงานของโปรแกรมโดยการกดปุ่ม Ctrl+C หรือปุ่ม Ctrl+Break
CHCP
แสดงข้อมูลหรือเปลี่ยนโค้ดเพจปัจจุบันของระบบ
CHDIR, CD
เปลี่ยนไดเรกทอรีการทำงานปัจจุบันหรือแสดงไดเรกทอรีปัจจุบัน
CLS
ล้างหน้าจอ
COPY
คัดลอกไฟล์จากต้นทางไปยังปลายทาง (หากมีไฟล์ปลายทางอยู่แล้ว ดอสจะถามว่าต้องการแทนที่ไฟล์ดังกล่าวหรือไม่) (ดูเพิ่มเติมที่ XCOPY คำสั่งภายนอกซึ่งสามารถคัดลอกทรีไดเรกทอรีได้ด้วย)
CTTY
กำหนดอุปกรณ์ที่จะใช้สำหรับส่วนนำเข้าและแสดงผล
DATE
แสดงผลและตั้งค่าวันที่ของระบบ
DEL, ERASE
ลบไฟล์ เมื่อใช้กับไดเรกทอรี จะลบเฉพาะไฟล์ที่อยู่ในไดเรกทอรีดังกล่าว ส่วนคำสั่งภายนอก DELTREE จะลบทั้งไดเรกทอรีย่อยและไฟล์ที่อยู่ในไดเรกทอรีดังกล่าว รวมทั้งลบไดเรกทอรีดังกล่าวออกด้วย
DIR
แสดงรายชื่อไฟล์ที่อยู่ในไดเรกทอรีที่ระบุ
ECHO
เปิด/ปิดการแสดงผลข้อความ (ECHO ON หรือ ECHO OFF) หรือแสดงผลข้อความบนหน้าจอ (ECHO text)
EXIT
ออกจาก COMMAND.COM และกลับไปที่โปรแกรมที่เรียกใช้
LFNFOR
เปิดหรือปิดใช้งานการส่งกลับชื่อไฟล์แบบยาวโดยคำสั่ง FOR (วินโดวส์ 9x)
LOADHIGH, LH
โหลดโปรแกรมเข้าไปในเขตปฏิบัติการหน่วยความจำสูง (HILOAD ใน DR DOS)
LOCK
เปิดให้โปรแกรมภายนอกเข้าถึงโวลุ่มดิสก์ระดับต่ำ (เฉพาะ DOS 7.1 และวินโดวส์ 9x)
MKDIR, MD
สร้างไดเรกทอรีใหม่
PATH
แสดงผลหรือเปลี่ยนค่าของตัวแปรสภาพแวดล้อม PATH ซึ่งควบคุมสถานที่ที่ COMMAND.COM ใช้สำหรับค้นหาไฟล์ปฏิบัติการ
PROMPT
แสดงผลหรือเปลี่ยนค่าของตัวแปรสภาพแวดล้อม PROMPT ซึ่งควบคุมการปรากฏของพร้อมท์
REN, RENAME
เปลี่ยนชื่อไฟล์หรือไดเรกทอรี
RMDIR, RD
ลบไดเรกทอรีว่างเปล่า
SET
กำหนดค่าของตัวแปรสภาพแวดล้อมโดยไม่มีอาร์กิวเมนต์ รวมถึงแสดงตัวแปรสภาพแวดล้อมที่กำหนดไว้ทั้งหมด
TIME
แสดงผลและตั้งค่าเวลาของระบบ
TRUENAME
แสดงชื่อจริงเต็มของไฟล์ โดยแปลงที่อยู่การแมประบบไฟล์แบบลอจิคัล ASSIGN, JOIN และ SUBST
TYPE
แสดงเนื้อหาของไฟล์บนคอนโซล
UNLOCK
ปิดใช้งานการเข้าถึงดิสก์ระดับต่ำ (เฉพาะ DOS 7.1 และวินโดวส์ 9x)
VER
แสดงรุ่นของระบบปฏิบัติการ
VERIFY
เปิดหรือปิดการยืนยันการเขียนไฟล์
VOL
แสดงข้อมูลเกี่ยวกับโวลุ่ม

คำสั่งไฟล์ชุดคำสั่ง

โครงสร้างการควบคุมมักจะถูกใช้ภายในไฟล์ชุดคำสั่ง ถึงแม้ว่าจะสามารถใช้โครงสร้างเหล่านั้นแบบโต้ตอบได้ก็ตาม

:label
กำหนดเป้าหมายสำหรับ GOTO
CALL
ดำเนินการไฟล์ชุดคำสั่งถัดไปก่อน แล้วจึงกลับมาที่ไฟล์แรกและดำเนินการต่อ
FOR
การทำซ้ำ: ทำซ้ำคำสั่งสำหรับแต่ละชุดของไฟล์
GOTO
ย้ายการดำเนินการไปยังป้ายชื่อที่ระบุ ป้ายชื่อจะถูกระบุที่ต้นบรรทัด พร้อมด้วยเครื่องหมายทวิภาค (:likethis).
IF
คำสั่งแบบเงื่อนไข ใช้ในการจำแนกคำสั่งในการดำเนินการโปรแกรม
PAUSE
หยุดการดำเนินการโปรแกรมและแสดงข้อความแจ้งผู้ใช้ให้กดปุ่มใดก็ได้เพื่อดำเนินการต่อ
REM
คอมเมนต์: ละเว้นข้อความใด ๆ ที่อยู่หลังคำสั่งนี้
SHIFT
แทนที่พารามิเตอร์การแทนที่แต่ละค่าด้วยค่าถัดไป (เช่น %0 ด้วย %1, %1 ด้วย %2 ฯลฯ)

คำสั่ง IF

เมื่อจะจบการทำงาน คำสั่งภายนอกทั้งหมดจะต้องส่งรหัสการส่งกลับ (เป็นค่าระหว่าง 0 ถึง 255) ไปยังโปรแกรมที่เรียก โดยโปรแกรมส่วนใหญ่จะมีแบบแผนบางอย่างสำหรับรหัสการส่งกลับนั้นด้วย (ตัวอย่างเช่น ค่า 0 สำหรับการดำเนินการที่สำเร็จ)

หากมีโปรแกรมใด ๆ ถูกเรียกโดย COMMAND.COM คำสั่งภายใน IF พร้อมคำสั่งแบบเงื่อนไข ERRORLEVEL จะสามารถนำมาใช้ทดสอบเงื่อนไขข้อผิดพลาดของโปรแกรมภายนอกที่เรียกล่าสุดได้

คำสั่งภายในจะไม่สร้างค่าใหม่ภายใต้ COMMAND.COM

ตัวแปร

ไฟล์ชุดคำสั่งสำหรับ COMMAND.COM มีตัวแปรสี่ชนิดดังต่อไปนี้:

  • Environment variables: These have the %VARIABLE% form and are associated with values with the SET statement. Before DOS 3 COMMAND.COM will only expand environment variables in batch mode; that is, not interactively at the command prompt.[ต้องการอ้างอิง]
  • Replacement parameters: These have the form %0, %1...%9, and initially contain the command name and the first nine command line parameters passed to the script (e.g., if the invoking command was "myscript.bat John Doe", then %0 is "myscript.bat", %1 is "John" and %2 is "Doe"). The parameters to the right of the ninth can be mapped into range by using the SHIFT statement.
  • Loop variables: Used in loops, they have the %%a format when run in batch files. These variables are defined solely within a specific FOR statement, and iterate over a certain set of values defined in that FOR statement.
  • Under Novell DOS 7, OpenDOS 7.01, DR-DOS 7.02 and higher, COMMAND.COM also supports a number of system information variables, a feature earlier found in 4DOS 3.00 and higher as well as in Multiuser DOS, although most of the supported variable names differ.

การเปลี่ยนเส้นทาง การเชื่อมต่อ และการเชื่อมโยง

Because DOS is a single-tasking operating system, piping is achieved by running commands sequentially, redirecting to and from a temporary file. COMMAND.COM makes no provision for redirecting the standard error channel.

command < filename
Redirect standard input from a file or device
command > filename
Redirect standard output, overwriting target file if it exists.
command >> filename
Redirect standard output, appending to target file if it exists.
command1 | command2
Pipe standard output from command1 to standard input of command2
command1command2
Commands separated by ASCII-20 (¶, invoked by Ctrl+T) are executed in sequence (chaining of commands). In other words, first command1 is executed until termination, then command2. This is an undocumented feature in COMMAND.COM of MS-DOS/PC DOS 5.0 and higher. It is also supported by COMMAND.COM of the Windows NT family as well as by DR-DOS 7.07. All versions of DR-DOS COMMAND.COM already supported a similar internal function utilizing an exclamation mark (!) instead (a feature originally derived from Concurrent DOS and Multiuser DOS) - however, in the single-user line this feature was only available internally (in built-in startup scripts like "!DATE!TIME") and indirectly through DOSKEY's $T parameter to avoid problems with ! as a valid filename character. 4DOS supports a configurable command line separator (4DOS.INI CommandSep= or SETDOS /C), which defaults to ^. COMMAND.COM in newer versions of Windows NT also supports a & separator for compatibility with the cmd syntax in OS/2 and the Windows NT family. (cmd, however, does not support the ¶ separator.)

ข้อจำกัด

ความยาวบรรทัดคำสั่งในโหมดแบบโต้ตอบจะถูกจำกัดไว้ที่ 126 ตัวอักษร

ในวัฒนธรรมยอดนิยม

"Loading COMMAND.COM" message can be seen on a HUD view of the Terminator and the internal viewport of RoboCop when he reboots.

In the CGI children's TV series ReBoot, which takes place inside computers, the leader of a system (the equivalent of a city) is called the COMMAND.COM.

The command.com domain once hosted a website with an image of a command prompt that has finished running the "dir" command on the root of an empty C drive. However, the resulting command incorrectly displayed the . and .. directories, which are never shown in the root of a drive.

ดูเพิ่ม

  • SHELL (CONFIG.SYS directive)
  • %COMSPEC%
  • %CMDLINE%
  • รายชื่อคำสั่งดอส
  • การเปรียบเทียบเชลล์คอมพิวเตอร์

รายการอ้างอิง

  1. Paul, Matthias (1997-07-30). . MPDOSTIP (ภาษาเยอรมัน) (3, release 157 ed.). คลังข้อมูลเก่า เก็บจาก แหล่งเดิม (e-book) เมื่อ 2016-11-04. สืบค้นเมื่อ 2014-08-06. Unknown parameter |dead-url= ignored (help) (NB. NWDOSTIP.TXT is part of MPDOSTIP.ZIP, maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)
  2. "Chapter 7: Batch Processing". . Caldera, Inc. 1998. คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2017-09-11. สืบค้นเมื่อ 2017-09-11. Unknown parameter |dead-url= ignored (help)
  3. Paul, Matthias (1997-05-01) [1993]. . MPDOSTIP (ภาษาเยอรมัน). 7: ERRORLEVEL abfragen. คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2017-08-23. สืบค้นเมื่อ 2017-08-23. Unknown parameter |dead-url= ignored (help) (NB. BATTIPS.TXT is part of MPDOSTIP.ZIP. The provided link points to a HTML-converted older version of the BATTIPS.TXT file.)
  4. Auer, Eric; Paul, Matthias; Hall, Jim (2015-12-24) [2003-12-31]. . คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2015-12-24. Unknown parameter |dead-url= ignored (help)
  5. Paul, Matthias (2003) [1997]. Auer, Eric (บ.ก.). "Exitcodes (errorlevels) of DOS utilities". คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2017-09-11. สืบค้นเมื่อ 2017-09-11. Unknown parameter |dead-url= ignored (help) [1]
  6. Allen, William; Allen, Linda. . คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2005-10-29. Unknown parameter |dead-url= ignored (help)
  7. . Caldera, Inc. 1998. คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2016-11-04. สืบค้นเมื่อ 2013-08-10. Unknown parameter |dead-url= ignored (help)
  8. Brothers, Hardin; Rawson, Tom; Conn, Rex C.; Paul, Matthias; Dye, Charles E.; Georgiev, Luchezar I. (2002-02-27). 4DOS 8.00 online help. […] Multiple Commands: You can type several commands on the same command line, separated by a caret [^]. For example, if you know you want to copy all of your .TXT files to drive A: and then run CHKDSK to be sure that drive A's file structure is in good shape, you could enter the following command: C:\>COPY *.TXT A: ^ CHKDSK A: You may put as many commands on the command line as you wish, as long as the total length of the command line does not exceed 511 characters. You can use multiple commands in aliases and batch files as well as at the command line. If you don't like using the default command separator, you can pick another character using the SETDOS /C command or the CommandSep directive in 4DOS.INI. […] SETDOS /C: (Compound character) This option sets the character used for separating multiple commands on the same line. The default is the caret [^]. You cannot use any of the redirection characters [<>|], or the blank, tab, comma, or equal sign as the command separator. The command separator is saved by SETLOCAL and restored by ENDLOCAL. This example changes the separator to a tilde [~]: C:\>SETDOS /C~ (You can specify either the character itself, or its ASCII code as a decimal number, or a hexadecimal number preceded by 0x.) […] CommandSep = c (^): This is the character used to separate multiple commands on the same line. […] Special Character Compatibility: If you use two or more of our products, or if you want to share aliases and batch files with users of different products, you need to be aware of the differences in three important characters: the Command Separator […], the Escape Character […], and the Parameter Character […]. The default values of each of these characters in each product is shown in the following chart: […] Product, Separator, Escape Parameter […] 4DOS: ^, ↑, & […] 4OS2, 4NT, Take Command: &, ^, $ […] (The up-arrow [↑] represents the ASCII Ctrl-X character, numeric value 24.) […]
  9. Paul, Matthias (1997-07-01) [1994]. . MPDOSTIP (ภาษาเยอรมัน). คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2017-08-22. สืบค้นเมื่อ 2013-10-25. Unknown parameter |dead-url= ignored (help) (NB. MSDOSTIP.TXT is part of MPDOSTIP.ZIP, maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the MSDOSTIP.TXT file.)
  10. . คลังข้อมูลเก่า เก็บจาก แหล่งเดิม เมื่อ 2006-02-18. Unknown parameter |dead-url= ignored (help)

command, ระว, งส, บสนก, เป, นอ, นเทอร, พร, เตอร, บรรท, ดคำส, งปร, ยายสำหร, บระบบปฏ, การดอส, นโดวส, นโดวส, และว, นโดวส, และเป, นส, วนต, ดต, อผ, ใช, ปร, ยายในดอส, โดยม, หน, าท, เพ, มเต, มค, อต, งค, าระบบโดยเร, ยกใช, ไฟล, การกำหนดค, autoexec, เม, อโปรแกรมแรกเร, ม. rawngsbsnkb cmd exe COMMAND COM epnxinethxrphrietxrbrrthdkhasngpriyaysahrbrabbptibtikardxs winodws 95 winodws 98 aelawinodwsmi aelaepnswntidtxphuichpriyayindxs odymihnathiephimetimkhuxtngkharabbodyeriykichiflkarkahndkha AUTOEXEC BAT emuxopraekrmaerkerimthanganhlngcakbutrabb rwmthungthahnathiepntnkaenidkhxngkrabwnkarthnghmddwy COMMAND COM runihmbnrabbptibtikaroxexs 2 aelawinodwsexnthicaepn cmd exe thungaemwa COMMAND COM caphrxmichnganbnrabbptibtikarehlannsungepnrun IA 32 ktamCOMMAND COM epnopraekrmdxs opraekrmthieriykichcak COMMAND COM caepnopraekrmdxsthiich MS DOS API inkarsuxsarkhxmulkbrabbptibtikar dxs enuxha 1 ohmdkarthangan 2 khasngphayin 3 khasngiflchudkhasng 4 khasng IF 5 twaepr 6 karepliynesnthang karechuxmtx aelakarechuxmoyng 7 khxcakd 8 inwthnthrrmyxdniym 9 duephim 10 raykarxangxingohmdkarthangan aekikhCOMMAND COM miohmdkarthanganxyudwyknsxngohmdinrupaebbechll odyohmdaerkcaepnohmdaebbottxb sungsahrbdaeninkarkhasngthiphuichphimphodythnthi ohmdthisxngcaepnohmdaebbklum sungdaeninkarladbkhasngthikahndiwlwnghnasungthukekbiwepniflkhxkhwamthiminamskulifl BATkhasngphayin aekikhkhasngphayinepnkhasngthibrrcuiwphayinibnarikhxng COMMAND COM odytrng sungphrxmichngantlxdewla aetsamartheriykichidephiyngcakxinethxrphrietxrkhasngodytrngethannkhasngthnghmdcathukdaeninkarhlngcakkdpum Enter thithaybrrthdkhasng odykhasngin COMMAND COM caimkhanungthungtwxksrphimphihy elk hmaykhwamwasamarthphimphkhasngidodycaepntwphimphihyhruxtwphimphelkkid BREAK khwbkhumkarcdkarkarkhdcnghwakarthangankhxngopraekrmodykarkdpum Ctrl C hruxpum Ctrl Break CHCP aesdngkhxmulhruxepliynokhdephcpccubnkhxngrabb CHDIR CD epliyniderkthxrikarthanganpccubnhruxaesdngiderkthxripccubn CLS langhnacx COPY khdlxkiflcaktnthangipyngplaythang hakmiiflplaythangxyuaelw dxscathamwatxngkaraethnthiifldngklawhruxim duephimetimthi XCOPY khasngphaynxksungsamarthkhdlxkthriiderkthxriiddwy CTTY kahndxupkrnthicaichsahrbswnnaekhaaelaaesdngphl DATE aesdngphlaelatngkhawnthikhxngrabb DEL ERASE lbifl emuxichkbiderkthxri calbechphaaiflthixyuiniderkthxridngklaw swnkhasngphaynxk DELTREE calbthngiderkthxriyxyaelaiflthixyuiniderkthxridngklaw rwmthnglbiderkthxridngklawxxkdwy DIR aesdngraychuxiflthixyuiniderkthxrithirabu ECHO epid pidkaraesdngphlkhxkhwam ECHO ON hrux ECHO OFF hruxaesdngphlkhxkhwambnhnacx ECHO text EXIT xxkcak COMMAND COM aelaklbipthiopraekrmthieriykich LFNFOR epidhruxpidichngankarsngklbchuxiflaebbyawodykhasng FOR winodws 9x LOADHIGH LH ohldopraekrmekhaipinekhtptibtikarhnwykhwamcasung HILOAD in DR DOS LOCK epidihopraekrmphaynxkekhathungowlumdiskradbta echphaa DOS 7 1 aelawinodws 9x MKDIR MD srangiderkthxriihm PATH aesdngphlhruxepliynkhakhxngtwaeprsphaphaewdlxm PATH sungkhwbkhumsthanthithi COMMAND COM ichsahrbkhnhaiflptibtikar PROMPT aesdngphlhruxepliynkhakhxngtwaeprsphaphaewdlxm PROMPT sungkhwbkhumkarpraktkhxngphrxmth REN RENAME epliynchuxiflhruxiderkthxri RMDIR RD lbiderkthxriwangepla SET kahndkhakhxngtwaeprsphaphaewdlxmodyimmixarkiwemnt rwmthungaesdngtwaeprsphaphaewdlxmthikahndiwthnghmd TIME aesdngphlaelatngkhaewlakhxngrabb TRUENAME aesdngchuxcringetmkhxngifl odyaeplngthixyukaraemprabbiflaebblxcikhl ASSIGN JOIN aela SUBST 1 TYPE aesdngenuxhakhxngiflbnkhxnosl UNLOCK pidichngankarekhathungdiskradbta echphaa DOS 7 1 aelawinodws 9x VER aesdngrunkhxngrabbptibtikar VERIFY epidhruxpidkaryunynkarekhiynifl VOL aesdngkhxmulekiywkbowlumkhasngiflchudkhasng aekikhokhrngsrangkarkhwbkhummkcathukichphayiniflchudkhasng thungaemwacasamarthichokhrngsrangehlannaebbottxbidktam 2 1 label kahndepahmaysahrb GOTO CALL daeninkariflchudkhasngthdipkxn aelwcungklbmathiiflaerkaeladaeninkartx FOR karthasa thasakhasngsahrbaetlachudkhxngifl GOTO yaykardaeninkaripyngpaychuxthirabu paychuxcathukrabuthitnbrrthd phrxmdwyekhruxnghmaythwiphakh likethis IF khasngaebbenguxnikh ichinkarcaaenkkhasnginkardaeninkaropraekrm PAUSE hyudkardaeninkaropraekrmaelaaesdngkhxkhwamaecngphuichihkdpumidkidephuxdaeninkartx REM khxmemnt laewnkhxkhwamid thixyuhlngkhasngni SHIFT aethnthipharamietxrkaraethnthiaetlakhadwykhathdip echn 0 dwy 1 1 dwy 2 l khasng IF aekikhemuxcacbkarthangan khasngphaynxkthnghmdcatxngsngrhskarsngklb epnkharahwang 0 thung 255 ipyngopraekrmthieriyk odyopraekrmswnihycamiaebbaephnbangxyangsahrbrhskarsngklbnndwy twxyangechn kha 0 sahrbkardaeninkarthisaerc 3 4 5 6 hakmiopraekrmid thukeriykody COMMAND COM khasngphayin IF phrxmkhasngaebbenguxnikh ERRORLEVEL casamarthnamaichthdsxbenguxnikhkhxphidphladkhxngopraekrmphaynxkthieriyklasudidkhasngphayincaimsrangkhaihmphayit COMMAND COMtwaepr aekikhiflchudkhasngsahrb COMMAND COM mitwaeprsichniddngtxipni Environment variables These have the VARIABLE form and are associated with values with the SET statement Before DOS 3 COMMAND COM will only expand environment variables in batch mode that is not interactively at the command prompt txngkarxangxing Replacement parameters These have the form 0 1 9 and initially contain the command name and the first nine command line parameters passed to the script e g if the invoking command was myscript bat John Doe then 0 is myscript bat 1 is John and 2 is Doe The parameters to the right of the ninth can be mapped into range by using the SHIFT statement Loop variables Used in loops they have the a format when run in batch files These variables are defined solely within a specific FOR statement and iterate over a certain set of values defined in that FOR statement Under Novell DOS 7 OpenDOS 7 01 DR DOS 7 02 and higher COMMAND COM also supports a number of system information variables 2 7 1 a feature earlier found in 4DOS 3 00 and higher 8 as well as in Multiuser DOS 1 although most of the supported variable names differ karepliynesnthang karechuxmtx aelakarechuxmoyng aekikhBecause DOS is a single tasking operating system piping is achieved by running commands sequentially redirecting to and from a temporary file COMMAND COM makes no provision for redirecting the standard error channel i command i lt i filename i Redirect standard input from a file or device i command i gt i filename i Redirect standard output overwriting target file if it exists i command i gt gt i filename i Redirect standard output appending to target file if it exists i command1 i i command2 i Pipe standard output from command1 to standard input of command2 i command1 i i command2 i Commands separated by ASCII 20 invoked by Ctrl T are executed in sequence chaining of commands 1 In other words first command1 is executed until termination then command2 1 This is an undocumented feature in COMMAND COM of MS DOS PC DOS 5 0 and higher 1 It is also supported by COMMAND COM of the Windows NT family as well as by DR DOS 7 07 All versions of DR DOS COMMAND COM already supported a similar internal function utilizing an exclamation mark instead a feature originally derived from Concurrent DOS and Multiuser DOS however in the single user line this feature was only available internally in built in startup scripts like DATE TIME and indirectly through DOSKEY s T parameter to avoid problems with as a valid filename character 1 4DOS supports a configurable command line separator 4DOS INI CommandSep or SETDOS C which defaults to 8 COMMAND COM in newer versions of Windows NT also supports a amp separator for compatibility with the cmd syntax in OS 2 and the Windows NT family 8 cmd however does not support the separator khxcakd aekikhkhwamyawbrrthdkhasnginohmdaebbottxbcathukcakdiwthi 126 twxksr 9 inwthnthrrmyxdniym aekikh Loading COMMAND COM message can be seen on a HUD view of the Terminator and the internal viewport of RoboCop when he reboots In the CGI children s TV series ReBoot which takes place inside computers the leader of a system the equivalent of a city is called the COMMAND COM The command com domain once hosted a website with an image of a command prompt that has finished running the dir command on the root of an empty C drive However the resulting command incorrectly displayed the and directories which are never shown in the root of a drive 10 duephim aekikhSHELL CONFIG SYS directive COMSPEC CMDLINE raychuxkhasngdxs karepriybethiybechllkhxmphiwetxrraykarxangxing aekikh 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 Paul Matthias 1997 07 30 NWDOS TIPs Tips amp Tricks rund um Novell DOS 7 mit Blick auf undokumentierte Details Bugs und Workarounds MPDOSTIP phasaeyxrmn 3 release 157 ed khlngkhxmuleka ekbcak aehlngedim e book emux 2016 11 04 subkhnemux 2014 08 06 Unknown parameter dead url ignored help NB NWDOSTIP TXT is part of MPDOSTIP ZIP maintained up to 2001 and distributed on many sites at the time The provided link points to a HTML converted older version of the NWDOSTIP TXT file 2 0 2 1 Chapter 7 Batch Processing DR DOS 7 02 User Guide Caldera Inc 1998 khlngkhxmuleka ekbcak aehlngedim emux 2017 09 11 subkhnemux 2017 09 11 Unknown parameter dead url ignored help Paul Matthias 1997 05 01 1993 BATTIPs Tips amp Tricks zur Programmierung von Batchjobs MPDOSTIP phasaeyxrmn 7 ERRORLEVEL abfragen khlngkhxmuleka ekbcak aehlngedim emux 2017 08 23 subkhnemux 2017 08 23 Unknown parameter dead url ignored help NB BATTIPS TXT is part of MPDOSTIP ZIP The provided link points to a HTML converted older version of the BATTIPS TXT file Auer Eric Paul Matthias Hall Jim 2015 12 24 2003 12 31 MS DOS errorlevels khlngkhxmuleka ekbcak aehlngedim emux 2015 12 24 Unknown parameter dead url ignored help Paul Matthias 2003 1997 Auer Eric b k Exitcodes errorlevels of DOS utilities khlngkhxmuleka ekbcak aehlngedim emux 2017 09 11 subkhnemux 2017 09 11 Unknown parameter dead url ignored help 1 Allen William Allen Linda Windows 95 98 ME ERRORLEVELs khlngkhxmuleka ekbcak aehlngedim emux 2005 10 29 Unknown parameter dead url ignored help DR DOS 7 02 User Guide Caldera Inc 1998 khlngkhxmuleka ekbcak aehlngedim emux 2016 11 04 subkhnemux 2013 08 10 Unknown parameter dead url ignored help 8 0 8 1 8 2 Brothers Hardin Rawson Tom Conn Rex C Paul Matthias Dye Charles E Georgiev Luchezar I 2002 02 27 4DOS 8 00 online help Multiple Commands You can type several commands on the same command line separated by a caret For example if you know you want to copy all of your TXT files to drive A and then run CHKDSK to be sure that drive A s file structure is in good shape you could enter the following command C gt COPY TXT A CHKDSK A You may put as many commands on the command line as you wish as long as the total length of the command line does not exceed 511 characters You can use multiple commands in aliases and batch files as well as at the command line If you don t like using the default command separator you can pick another character using the SETDOS C command or the CommandSep directive in 4DOS INI SETDOS C Compound character This option sets the character used for separating multiple commands on the same line The default is the caret You cannot use any of the redirection characters lt gt or the blank tab comma or equal sign as the command separator The command separator is saved by SETLOCAL and restored by ENDLOCAL This example changes the separator to a tilde C gt SETDOS C You can specify either the character itself or its ASCII code as a decimal number or a hexadecimal number preceded by 0x CommandSep c This is the character used to separate multiple commands on the same line Special Character Compatibility If you use two or more of our products or if you want to share aliases and batch files with users of different products you need to be aware of the differences in three important characters the Command Separator the Escape Character and the Parameter Character The default values of each of these characters in each product is shown in the following chart Product Separator Escape Parameter 4DOS amp 4OS2 4NT Take Command amp The up arrow represents the ASCII Ctrl X character numeric value 24 Paul Matthias 1997 07 01 1994 MSDOSTIPs Tips fur den Umgang mit MS DOS 5 0 7 MPDOSTIP phasaeyxrmn khlngkhxmuleka ekbcak aehlngedim emux 2017 08 22 subkhnemux 2013 10 25 Unknown parameter dead url ignored help NB MSDOSTIP TXT is part of MPDOSTIP ZIP maintained up to 2001 and distributed on many sites at the time The provided link points to a HTML converted older version of the MSDOSTIP TXT file COMMAND COM khlngkhxmuleka ekbcak aehlngedim emux 2006 02 18 Unknown parameter dead url ignored help ekhathungcak https th wikipedia org w index php title COMMAND COM amp oldid 9414547, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม