About cacls
The cacls command enables a user to view and modify the ACLs of a file. If you're wanting to change the read/write, hidden, system settings of the file see the attrib command.
Availability
The cacls.exe command is an external command and is available in the below Microsoft operating systems.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]] [/P user:perm [...]] [/D user [...]]
filename | Displays ACLs. | ||||||||||
/T |
Changes ACLs of specified files in the current directory and all subdirectories. | ||||||||||
/E | Edit ACL instead of replacing it. | ||||||||||
/C | Continue on access denied errors. | ||||||||||
/G user:perm | Grant specified user access rights.
|
||||||||||
/R user | Revoke specified user's access rights (only valid with /E). | ||||||||||
/P user:perm | Replace specified user's access rights.
|
||||||||||
/D user | Deny specified user access. |
Wildcards can be used to specify more that one file in a command. You can specify more than one user in a command.
Examples
cacls myfile.txt
C:\WINNT\MYFILE.TXT | BUILTIN\Users:R BUILTIN\Power Users:C BUILTIN\Administrators:F NT AUTHORITY\SYSTEM:F |
cacls myfile.txt /e /g mrhope:f
About call
Enables a user to execute a batch file from within another batch file.
Availability
The call command is an internal command and is available in the below Microsoft operating systems.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
MS-DOS, Windows 95, Windows 98, Windows ME call syntaxCalls one batch program from another.
CALL [drive:][path]filename [batch-parameters]
batch-parameters specifies any command-line information required by the batch program.
Windows 2000 and Windows XP call syntax
Calls one batch program from another.
CALL [drive:][path]filename [batch-parameters]
If Command Extensions are enabled, CALL changes as follows:
CALL command now accepts labels as the target of the CALL. The syntax is:
CALL :label arguments
A new batch file context is created with the specified arguments and control is passed to the statement after the label specified. You must "exit" twice by reaching the end of the batch script file twice. The first time you read the end, control will return to just after the CALL statement. The second time will exit the batch script. Type GOTO /? for a description of the GOTO :EOF extension that will allow you to "return" from a batch script.
In addition, expansion of batch script argument references (%0, %1, etc.) have been changed as follows:
%* in a batch script refers to all the arguments (e.g. %1 %2 %3 %4 %5 ...)
Substitution of batch parameters (%n) has been enhanced. You can now use the below optional syntax:
%~1 |
expands %1 removing any surrounding quotes (") |
%~f1 | expands %1 to a fully qualified path name |
%~d1 | expands %1 to a drive letter only |
%~p1 | expands %1 to a path only |
%~n1 | expands %1 to a file name only |
%~x1 | expands %1 to a file extension only |
%~s1 | expanded path contains short names only |
%~a1 | expands %1 to file attributes |
%~t1 | expands %1 to date/time of file |
%~z1 | expands %1 to size of file |
%~$PATH:1 | searches the directories listed in the PATH environment variable and expands %1 to the fully qualified name of the first one found. If the environment variable name is not defined or the file is not found by the search, then this modifier expands to the empty string |
%~dp1 | expands %1 to a drive letter and path only |
%~nx1 | expands %1 to a file name and extension only |
%~dp$PATH:1 | searches the directories listed in the PATH environment variable for %1 and expands to the drive letter and path of the first one found. |
%~ftza1 | expands %1 to a DIR-like output line |
In the above examples, %1 and PATH can be replaced by other valid values. The %~ syntax is terminated by a valid argument number. The %~ modifiers may not be used with %*
Examples
call second.bat
Executes the second.bat batch file batch file from within another batch file.
About cd
CD (Change Directory) is a command used to switch
directories in MS-DOS and the Windows
command line.
Availability
The CD command is an internal command and is available in the below Microsoft operating systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Windows XP and later syntaxCHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]
.. Specifies that you want to change to the parent directory.
Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.
Use the /D switch to change current drive in addition to changing current directory for a drive.
If Command Extensions are enabled CHDIR changes as follows:
The current directory string is converted to use the same case as the on disk names. So CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.
CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory name that contains a space without surrounding the name with quotes. For example:
cd \winnt\profiles\username\programs\start menu
is the same as:
cd "\winnt\profiles\username\programs\start menu"
which is what you would have to type if extensions were disabled.
Windows 98 and earlier syntax
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]
Examples
cd\
Goes to the highest level, the root of the drive.
cd..
Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory, this would take you to C:\Windows>
Windows 95, 98, and later versions have a feature in the CD command that allows you to go back more than one directory when using the dots. For example, typing: cd... with three dots after the cd would take you back two directories.
cd windows
If present, would take you into the Windows directory. Windows can be substituted with any other name.
cd\windows
If present, would first move back to the root of the drive and then go into the Windows directory.
cd\windows\system32
If present, would move into
the system32 directory located in the Windows directory. If at any time
you need to see what directories are available in the directory you're
currently in use the dir command.
cd /d e:\pics
If for example you were on the C: drive, typing the above
command with the /d option would first switch the E: drive letter and
then move into the pics directory.
cd
Typing cd alone will print the working
directory. For example, if you're in c:\windows> and you type the cd
it will print c:\windows. For those users who are familiar with Unix
or Linux this could be thought of as doing the pwd (print working directory) command.
About chcp
Before the chcp command can be used, the nlsfunc must be loaded, as well as the country.sys must be loaded into the config.sys.
The chcp command is used to supplement the International keyboard and character set information, allowing MS-DOS to be used in other countries and with different languages.
Availability
The chcp.com command is an external command that is available in the below Microsoft operating systems.MS-DOS 6.22 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Country
and Regions
Keybrd2.sys Country/Regions274, 275 - Brazil442 - Bulgaria
319 - Greece
161 - Iceland
118 - Macedonia, Serbia, and Montenegro
333 - Romania
441 - Russian
440, 179 - Turkish
Code pages
EGA.CPI Codepages437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
860 - Portuguese
863 - Canadian-French
865 - Nordic
EGA2.CPI Codepages737 - Greek II
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
857 - Turkish
861 - Greek
EGA3.CPI Codepages437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
855 - Cyrillic I
866 - Russian (Cyrillic II)
Syntax
Displays or sets the active code page number.
CHCP [nnn]
nnn Specifies a code page number.
Type CHCP without a parameter to display the active code page number.
Examples
chcp
Display the page number.
chcp 447
Sets the active page to 447.
How to load
Note: If you are using MS-DOS, you would want to substitute c:\windows\command with c:\dos in the below examples.
Autoexec.bat
country=354,861; c:\windows\command.country.sys
Device=c:\windows\command\display.sys con=(,,2)
Config.sys
mode con cp prepare=((861 850) c:\windows\command\ega2.cpi)
mode con cp select=861
keyb is,,c:\windows\command\keybrd2.sys
About chdir
Chdir (Change Directory) is a command used to switch directories in MS-DOS.
Availability
The chdir command is an internal command and is available in the below Microsoft operating systems.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
CHDIR [drive:][path]CHDIR[..]
CD [drive:][path]
CD[..]
Examples
chdir\
Goes to the highest level, the root of the drive.
chdir..
Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory, this would take you to C:\Windows>
Windows 95, Windows 98 and later versions of windows allow you to go back more than one directory by using three or more dots. For example, typing chdir... with three dots after the cd would take you back two directories.
chdir windows
If present, would take you into the Windows directory. Windows can be substituted with any other name.
About chkdsk
Chkdsk is a utility that checks the computer's hard drive status for any cross-linked or any additional errors with the hard drive.
MS-DOS versions 2.x - 4.x used chkdsk.com,
MS-DOS versions 5.x and beyond used chkdsk.exe.
Availability
The chkdsk command is an external command and is available in the below Microsoft operating systems.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
MS-DOS, Windows 95, Windows 98, Windows ME chkdsk syntaxChecks a disk and displays a status report.
CHKDSK [drive:][[path]filename] [/F] [/V]
[drive:][path] | Specifies the drive and directory to check. |
filename | Specifies the file(s) to check for fragmentation. |
/F | Fixes errors on the disk. |
/V | Displays the full path and name of every file on the disk. |
Windows 2000 and Windows XP chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
volume | Specifies the drive letter (followed by a colon), mount point, or volume name. |
filename | FAT only: Specifies the files to check for fragmentation. |
/F | Fixes errors on the disk. |
/V | On FAT/FAT32: Displays the full path and name of every file on the disk. |
/R | Locates bad sectors and recovers readable information (implies /F). |
/L:size | NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size. |
/X | Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F). |
/I | NTFS only: Performs a less vigorous check of index entries. |
/C | NTFS only: Skips checking of cycles within the folder structure. |
Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using the CHKNTFS command.
Windows 2000 and Windows XP recovery console chkdsk syntax
Note: The below options are only available in the recovery console.
Checks a disk and displays a status report.
chkdsk [drive:] [/p] | [/r]
[drive:] | Specifies the drive to check. |
/p | Check even if the drive is not flagged dirty, bad. |
/r | Locates bad sectors and recovers readable information (implies /p). |
Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup (boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location of Autochk.exe.
Examples
chkdsk
Will display all information described above and also report any crossed linked files.
chkdsk /f
Will fix any crossed linked files; however, do not run this command while you are in Windows95 or Windows 3.x
About chkntfs
The chkntfs command is used to display or modify the checking of the disk drive using NTFS at boot time.
Availability
The chkntfs.exe command is an external command and is available in the below Microsoft operating systems.Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or modifies the checking of disk at boot time.CHKNTFS volume [...]
CHKNTFS /D
CHKNTFS /T[:time]
CHKNTFS /X volume [...]
CHKNTFS /C volume [...]
volume |
Specifies the drive letter (followed by a colon), mount point, or volume name. |
/D | Restores the machine to the default behavior; all drives are checked at boot time and chkdsk is run on those that are dirty. |
/T:time | Changes the AUTOCHK initiation count down time to the specified amount of time in seconds. If time is not specified, displays the current setting. |
/X | Excludes a drive from the default boot-time check. Excluded drives are not accumulated between command invocations. |
/C | Schedules a drive to be checked at boot time; chkdsk will run if the drive is dirty. |
If no switches are specified, CHKNTFS will display if the specified drive is dirty or scheduled to be checked on next reboot.
Examples
chkntfs /d
Restores the computer back to the default settings and all drives are checked at boot if they are dirty.
About choice
Allows for batch files and scripts to wait for the user to choose a set of choices.
Microsoft Windows 2000 and Windows XP users who have batch files that utilize the choice command should modify the batch file to use the MS-DOS set command.
Availability
The choice command is an external command and is available inMS-DOS 6.0+
Windows 95
Windows 98
Windows Vista
Windows 7
Syntax
choice [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]Options:
/C[:]choices | Specifies allowable keys. Default is YN |
/N | Do not display choices and ? at end of prompt string. |
/S | Treat choice keys as case sensitive. |
/T[:]c,nn | Default choice to c after nn seconds |
text | Prompt string to display |
About cipher
Displays or alters the encryption of directories [files] on NTFS partitions.
Availability
The cipher.exe command is an external command that is available in the below Microsoft operating systems.Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or alters the encryption of directories [files] on NTFS partitions.CIPHER [/E | /D] [/S:dir] [/A] [/I] [/F] [/Q] [/H] [/K] [pathname [...]]
CIPHER /W:directory
CIPHER /X[:efsfile] [filename]
/E | Encrypts the specified directories. Directories will be marked so that files added afterward will be encrypted. |
/D | Decrypts the specified directories. Directories will be marked so that files added afterward will not be encrypted. |
/S | Performs the specified operation on directories in the given directory and all subdirectories. |
/A | Operation for files as well as directories. The encrypted file could become decrypted when it is modified if the parent directory is not encrypted. It is recommended that you encrypt the file and the parent directory. |
/I | Continues performing the specified operation even after errors have occurred. By default, CIPHER stops when an error is encountered. |
/F | Forces the encryption operation on all specified objects, even those that are already encrypted. Already-encrypted objects are skipped by default. |
/Q | Reports only the most essential information. |
/H | Displays files with the hidden or system attributes. These files are omitted by default. |
/K | Create new file encryption key for the user running CIPHER. If this option is chosen, all the other options will be ignored. |
/W | Removes data from available unused disk space on the entire volume. If this option is chosen, all other options are ignored. The directory specified can be anywhere in a local volume. If it is a mount point or points to a directory in another volume, the data on that volume will be removed. |
/X | Backup EFS certificate and keys into file filename. If efsfile is provided, the current user's certificate(s) used to encrypt the file will be backed up. Otherwise, the user's current EFS certificate and keys will be backed up. |
dir | A directory path. |
pathname | Specifies a pattern, file or directory. |
efsfile | An encrypted file path. |
Used without parameters, CIPHER displays the encryption state of the current directory and any files it contains. You may use multiple directory names and wildcards. You must put spaces between multiple parameters.
Examples
Display the status of each of the files in the current directory.
cipher
For example, running the above command may display something similar to the below example.C:\DOCUME~1\ADMINI~1\Desktop>cipher
Listing C:\DOCUME~1\ADMINI~1\Desktop\
New files added to this directory will not be encrypted.
U 308374_harddisk_3.jpg
U cipher.txt
U FileZilla.lnk
U hope.txt
U inc
U l-gloss.pdf
U logos.gif
U Main_Page.htm
U Main_Page_files
U maxivistademo.zip
U move
Next, if we wanted to enable encryption on a directory, type a command similar to the below command. In the below example this is encrypting the hope directory and will encrypt any files added into that directory after the encryption has been enabled.
cipher /e hope
Encrypting directories in C:\DOCUME~1\ADMINI~1\Desktop\test [OK]
About cls
Cls is a command that allows a user to clear the complete contents of the screen and leave only a prompt.
Availability
The cls command is an internal command and is available in the below Microsoft operating systems.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
CLS
Examples
cls
Running the cls command at the command prompt would clear your screen of all previous text and only return the prompt.
About command
The command.com is the command interpreter for MS-DOS and is required for Microsoft operating systems. Without command.com the computer running a Microsoft operating system would be unable to boot.
When running Windows NT, 2000, XP, or future operating systems there are two versions of the command interpreter, command.com and cmd.exe. Cmd offers additional environment variables than command.com; however, it is recommend if you are attempting to run a MS-DOS utility that you utilize the command.com. To use command.com, click Start, Run, and type command.
- Information about creating a bootable diskette, which also requires command.com, can be found on our boot diskette page.
- Additional information about shells can be found on our shell dictionary definition.
- COMMAND.COM vs. CMD.EXE.
Availability
Command, or command.com, is the command interpreter, and with
early versions of Windows and MS-DOS, you would not be able to use the
computer without
this file. This file is available on all versions of Microsoft
Windows and later versions of Windows use it to access the MS-DOS
shell.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Windows 2000, XP, Vista, 7, and 8 "cmd" syntax
Early Windows "command" syntax
Early Windows "command" syntax
Windows 2000, XP, Vista, 7, and 8 "cmd" syntax
Starts a new instance of the Windows 2000 or Windows XP command interpreter.CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C | Carries out the command specified by string and then terminates |
/K | Carries out the command specified by string but remains |
/S | Modifies the treatment of string after /C or /K (see below) |
/Q | Turns echo off |
/D | Disable execution of AutoRun commands from registry (see below) |
/A | Causes the output of internal commands to a pipe or file to be ANSI |
/U | Causes the output of internal commands to a pipe or file to be Unicode |
/T:fg | Sets the foreground/background colors (see COLOR /? for more info) |
/E:ON | Enable command extensions (see below) |
/E:OFF | Disable command extensions (see below) |
/F:ON | Enable file and directory name completion characters (see below) |
/F:OFF | Disable file and directory name completion characters (see below) |
/V:ON | Enable delayed environment variable expansion using c as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop. |
/V:OFF | Disable delayed environment expansion. |
Note that multiple commands separated by the command separator '&&' are accepted for string if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Command Extensions are enabled by default. You may also disable extensions for a particular invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FType
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for directory name completion and Ctrl-F for file name completion. To disable a particular completion character in the registry, use the value for space (0x20) as it is not a valid control character.
Completion is invoked when you type either of the two control characters. The completion function takes the path string to the left of the cursor appends a wild card character to it if none is already present and builds up a list of paths that match. It then displays the first matching path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing of the same control character will cycle through the list of matching paths. Pressing the Shift key with the control character will move through the list backwards. If you edit the line in any way and press the control character again, the saved list of matching paths is discarded and a new one generated.
The same occurs if you switch between file and directory name completion. The only difference between the two control characters is the file completion character matches both file and directory names, while the directory completion character only matches directory names. If file completion is used on any of the built in directory commands (CD, MD or RD) then directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special characters by placing quotes around the matching path. Also, if you backup, then invoke completion from within a line, the text to the right of the cursor at the point completion was invoked is discarded.
The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~
Early Windows "command" syntax
Starts a new copy of the Windows Command Interpreter.COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K] command]
[drive:]path | Specifies the directory containing COMMAND.COM. |
device | Specifies the device to use for command input and output. |
/E:nnnnn | Sets the initial environment size to nnnnn bytes. (nnnnn should be between 256 and 32,768). |
/L:nnnn | Specifies internal buffers length (requires /P as well). (nnnn should be between 128 and 1,024). |
/U:nnn | Specifies the input buffer length (requires /P as well). (nnn should be between 128 and 255). |
/P | Makes the new Command Interpreter permanent (can't exit). |
/MSG | Stores all error messages in memory (requires /P as well). |
/LOW | Forces COMMAND to keep its resident data in low memory. |
/Y | Steps through the batch program specified by /C or /K. (Only available in MS-DOS 6.x and above). |
/C command | Executes the specified command and returns. |
/K command | Executes the specified command and continues running. |
/Z | Display the errorlevel of every command executed (Only available in MS-DOS 7.x and above). |
Examples
cmd
Opens the cmd command shell. If you were already in a command shell and run the "cmd" or "command" command at the command line a new Windows command line would be opened. Typing "exit" would exit the new command line and return you back to the command line you ran the command from.
About command
When running Windows NT, 2000, XP, or future operating systems there are two versions of the command interpreter, command.com and cmd.exe. Cmd offers additional environment variables than command.com; however, it is recommend if you are attempting to run a MS-DOS utility that you utilize the command.com. To use command.com, click Start, Run, and type command.
- Information about creating a bootable diskette, which also requires command.com, can be found on our boot diskette page.
- Additional information about shells can be found on our shell dictionary definition.
- COMMAND.COM vs. CMD.EXE.
Availability
Command, or command.com, is the command interpreter, and with
early versions of Windows and MS-DOS, you would not be able to use the
computer without
this file. This file is available on all versions of Microsoft
Windows and later versions of Windows use it to access the MS-DOS
shell.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Windows 2000, XP, Vista, 7, and 8 "cmd" syntax
Early Windows "command" syntax
Early Windows "command" syntax
Windows 2000, XP, Vista, 7, and 8 "cmd" syntax
Starts a new instance of the Windows 2000 or Windows XP command interpreter.CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C | Carries out the command specified by string and then terminates |
/K | Carries out the command specified by string but remains |
/S | Modifies the treatment of string after /C or /K (see below) |
/Q | Turns echo off |
/D | Disable execution of AutoRun commands from registry (see below) |
/A | Causes the output of internal commands to a pipe or file to be ANSI |
/U | Causes the output of internal commands to a pipe or file to be Unicode |
/T:fg | Sets the foreground/background colors (see COLOR /? for more info) |
/E:ON | Enable command extensions (see below) |
/E:OFF | Disable command extensions (see below) |
/F:ON | Enable file and directory name completion characters (see below) |
/F:OFF | Disable file and directory name completion characters (see below) |
/V:ON | Enable delayed environment variable expansion using c as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop. |
/V:OFF | Disable delayed environment expansion. |
Note that multiple commands separated by the command separator '&&' are accepted for string if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
Command Extensions are enabled by default. You may also disable extensions for a particular invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FType
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for directory name completion and Ctrl-F for file name completion. To disable a particular completion character in the registry, use the value for space (0x20) as it is not a valid control character.
Completion is invoked when you type either of the two control characters. The completion function takes the path string to the left of the cursor appends a wild card character to it if none is already present and builds up a list of paths that match. It then displays the first matching path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing of the same control character will cycle through the list of matching paths. Pressing the Shift key with the control character will move through the list backwards. If you edit the line in any way and press the control character again, the saved list of matching paths is discarded and a new one generated. The same occurs if you switch between file and directory name completion. The only difference between the two control characters is the file completion character matches both file and directory names, while the directory completion character only matches directory names. If file completion is used on any of the built in directory commands (CD, MD or RD) then directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special characters by placing quotes around the matching path. Also, if you backup, then invoke completion from within a line, the text to the right of the cursor at the point completion was invoked is discarded.
The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~
Early Windows "command" syntax
Starts a new copy of the Windows Command Interpreter.COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K] command]
[drive:]path | Specifies the directory containing COMMAND.COM. |
device | Specifies the device to use for command input and output. |
/E:nnnnn | Sets the initial environment size to nnnnn bytes. (nnnnn should be between 256 and 32,768). |
/L:nnnn | Specifies internal buffers length (requires /P as well). (nnnn should be between 128 and 1,024). |
/U:nnn | Specifies the input buffer length (requires /P as well). (nnn should be between 128 and 255). |
/P | Makes the new Command Interpreter permanent (can't exit). |
/MSG | Stores all error messages in memory (requires /P as well). |
/LOW | Forces COMMAND to keep its resident data in low memory. |
/Y | Steps through the batch program specified by /C or /K. (Only available in MS-DOS 6.x and above). |
/C command | Executes the specified command and returns. |
/K command | Executes the specified command and continues running. |
/Z | Display the errorlevel of every command executed (Only available in MS-DOS 7.x and above). |
Examples
cmd
Opens the cmd command shell. If you were already in a command shell and run the "cmd" or "command" command at the command line a new Windows command line would be opened. Typing "exit" would exit the new command line and return you back to the command line you ran the command from.
About command
When running Windows NT, 2000, XP, or future operating systems there are two versions of the command interpreter, command.com and cmd.exe. Cmd offers additional environment variables than command.com; however, it is recommend if you are attempting to run a MS-DOS utility that you utilize the command.com. To use command.com, click Start, Run, and type command.
- Information about creating a bootable diskette, which also requires command.com, can be found on our boot diskette page.
- Additional information about shells can be found on our shell dictionary definition.
- COMMAND.COM vs. CMD.EXE.
Availability
Command, or command.com, is the command interpreter, and with
early versions of Windows and MS-DOS, you would not be able to use the
computer without
this file. This file is available on all versions of Microsoft
Windows and later versions of Windows use it to access the MS-DOS
shell.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
CMD, or CMD.EXE, is the command line shell introduced in Windows NT and available in all the below versions of Microsoft Windows.
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Windows 2000, XP, Vista, 7, and 8 "cmd" syntax
Early Windows "command" syntax
Early Windows "command" syntax
Windows 2000, XP, Vista, 7, and 8 "cmd" syntax
Starts a new instance of the Windows 2000 or Windows XP command interpreter.CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C | Carries out the command specified by string and then terminates |
/K | Carries out the command specified by string but remains |
/S | Modifies the treatment of string after /C or /K (see below) |
/Q | Turns echo off |
/D | Disable execution of AutoRun commands from registry (see below) |
/A | Causes the output of internal commands to a pipe or file to be ANSI |
/U | Causes the output of internal commands to a pipe or file to be Unicode |
/T:fg | Sets the foreground/background colors (see COLOR /? for more info) |
/E:ON | Enable command extensions (see below) |
/E:OFF | Disable command extensions (see below) |
/F:ON | Enable file and directory name completion characters (see below) |
/F:OFF | Disable file and directory name completion characters (see below) |
/V:ON | Enable delayed environment variable expansion using c as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop. |
/V:OFF | Disable delayed environment expansion. |
If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters:
1. If all of the following conditions are met, then quote characters on the command line are preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the two quote characters
- the string between the two quote characters is the name of an executable file.
2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character.
If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRunCommand Extensions are enabled by default. You may also disable extensions for a particular invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
or
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.
The command extensions involve changes or additions to the below commands.
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FType
To get specific details, type commandname /? to view the specifics.
Delayed environment variable expansion is NOT enabled by default. You can enable or disable delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
or
to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.
If delayed environment variable expansion is enabled, then the exclamation character can be used to substitute the value of an environment variable at execution time.
File and Directory name completion is NOT enabled by default. You can enable or disable file name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The command line switches take precedence over the registry settings.
If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for directory name completion and Ctrl-F for file name completion. To disable a particular completion character in the registry, use the value for space (0x20) as it is not a valid control character.
Completion is invoked when you type either of the two control characters. The completion function takes the path string to the left of the cursor appends a wild card character to it if none is already present and builds up a list of paths that match. It then displays the first matching path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing of the same control character will cycle through the list of matching paths.
Pressing the Shift key with the control character will move through the list backwards. If you edit the line in any way and press the control character again, the saved list of matching paths is discarded and a new one generated. The same occurs if you switch between file and directory name completion. The only difference between the two control characters is the file completion character matches both file and directory names, while the directory completion character only matches directory names. If file completion is used on any of the built in directory commands (CD, MD or RD) then directory completion is assumed.
The completion code deals correctly with file names that contain spaces or other special characters by placing quotes around the matching path. Also, if you backup, then invoke completion from within a line, the text to the right of the cursor at the point completion was invoked is discarded.
The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~
Early Windows "command" syntax
Starts a new copy of the Windows Command Interpreter.COMMAND [[drive:] path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/C|K] command]
[drive:]path | Specifies the directory containing COMMAND.COM. |
device | Specifies the device to use for command input and output. |
/E:nnnnn | Sets the initial environment size to nnnnn bytes. (nnnnn should be between 256 and 32,768). |
/L:nnnn | Specifies internal buffers length (requires /P as well). (nnnn should be between 128 and 1,024). |
/U:nnn | Specifies the input buffer length (requires /P as well). (nnn should be between 128 and 255). |
/P | Makes the new Command Interpreter permanent (can't exit). |
/MSG | Stores all error messages in memory (requires /P as well). |
/LOW | Forces COMMAND to keep its resident data in low memory. |
/Y | Steps through the batch program specified by /C or /K. (Only available in MS-DOS 6.x and above). |
/C command | Executes the specified command and returns. |
/K command | Executes the specified command and continues running. |
/Z | Display the errorlevel of every command executed (Only available in MS-DOS 7.x and above). |
Examples
cmd
Opens the cmd command shell. If you were already in a command shell and run the "cmd" or "command" command at the command line a new Windows command line would be opened. Typing "exit" would exit the new command line and return you back to the command line you ran the command from.
About comp
Availability
The comp.exe command is an external command and is available in the below Microsoft operating systems.Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Compares the contents of two files or sets of files.COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]
data1 | Specifies location and name(s) of first file(s) to compare. |
data2 | Specifies location and name(s) of second files to compare. |
/D | Displays differences in decimal format. |
/A | Displays differences in ASCII characters. |
/L | Displays line numbers for differences. |
/N=number | Compares only the first specified number of lines in each file. |
/C | Disregards case of ASCII letters when comparing files. |
Examples
Note: Unless the /N option is used the comp command will only compare the size of the file.
comp file1.txt file2.txt /N=10 /A
Compares file1.txt with file2.txt. In this example we are using the /A option to display the ASCII
characters
that the compare has found different. If the /A option is not
displayed, the comp command will display
the differences in hexadecimal notation. Below is an example of how
the comp command may display the comparison in this example.Compare error at LINE 5
file1 = i
file2 = o
Compare error at LINE 5
file1 = v
file2 = u
Compare error at LINE 5
file1 = e
file2 = r
Compare error at LINE 6
file1 = s
file2 = f
Compare error at LINE 6
file1 = x
file2 = v
Compare error at LINE 6
file1 =
file2 = e
Compare error at LINE 7
file1 =
file2 =
Compare error at LINE 7
file1 =
file2 =
Compare error at LINE 8
file1 =
file2 = s
File1 only has 7 lines
About compact
Availability
The compact.exe command is an external command and is available in the below Microsoft operating systems.Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Displays or alters the compression of files on NTFS partitions.COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]
/C | Compresses the specified files. Directories will be marked so that files added afterward will be compressed. |
/U | Uncompresses the specified files. Directories will be marked so that files added afterward will not be compressed. |
/S | Performs the specified operation on files in the given directory and all subdirectories. Default "dir" is the current directory. |
/A | Displays files with the hidden or system attributes. These files are omitted by default. |
/I | Continues performing the specified operation even after errors have occurred. By default, COMPACT stops when an error is encountered. |
/F | Forces the compress operation on all specified files, even those that are already compressed. Already-compressed files are skipped by default. |
/Q | Reports only the most essential information. |
filename | Specifies a pattern, file, or directory. |
Used without parameters, COMPACT displays the compression state of the current directory and any files it contains. You may use multiple filenames and wildcards. You must put spaces between multiple parameters.
Examples
compact
Display all the files in the current directory and their compact status.
compact file.txt
Display the compact status of the file file.txt
compact file.txt /C
Compacts the file.txt file.
About control
Availability
The control command is an external command and is available in the below Microsoft operating systems.Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Note: Although this command is available in all versions of Microsoft Windows after the release of Windows 95, not all versions support the same commands. See the chart in examples for additional information.
Syntax
No syntax is available for the control command. For
available commands see the below examples of all the available commands
control is
capable of doing through the command and run line.
Examples
Below is a chart of the available options the command is capable
of doing. Each release of Microsoft Windows supports different options
for this
command therefore we have also listed if the command is or is not
supported in each of the Windows operating systems.Command | 95/98/ME | NT | 2000/XP | Information |
---|---|---|---|---|
Control admintools | No | No | Yes | Opens the Microsoft Windows Administrative Tools window. |
Control desktop | Yes | Yes | Yes | Opens the Microsoft Windows Display Properties window. |
Control color | Yes | Yes | Yes | Opens the Microsoft Windows Display Properties window with the appearance tab open. |
Control date/time | Yes | Yes | Yes | Opens the Microsoft Windows Date/Time Properties window. |
Control folders | No | No | No/Yes | Opens the Microsoft Windows Folder Options. |
Control fonts | Yes | Yes | Yes | Opens the Microsoft Windows Fonts folder. |
Control infrared | Yes | Yes | Yes | Opens the Microsoft Windows Infrared folder if available. |
Control international | Yes | Yes | Yes | Opens the Microsoft Windows Regional Options window. |
Control keyboard | Yes | Yes | Yes | Opens the Microsoft Windows Keyboard Properties window. |
Control mouse | Yes | Yes | Yes | Opens the Microsoft Windows Mouse Properties window. |
Control netconnections | No | No | Yes | Opens the Microsoft Windows Network and Dial-up Connections window. |
Control netware | No | No | Yes | Opens the Microsoft Windows Netware window if installed and available |
Control panel | No | No | Yes | Opens the Microsoft Windows Control Panel. |
Control printers | Yes | Yes | Yes | Opens the Microsoft Windows Printers window. |
Control schedtasks | No | No | Yes | Opens the Microsoft Windows Schedule tasks window. |
Control telephony | No | No | Yes | Opens the Microsoft Windows Location information window. |
Control userpasswords | No | No | Yes | Opens the Microsoft Windows Users and Passwords window. |
The control command is also capable of executing many of the .cpl files located on your computer; for example, a user can type the below command to open the Time and Date window.
control TimeDate.cpl
- A listing of .cpl files and additional information about adding and removing icons in the Control Panel.
About convert
Converts FAT volumes to NTFS.
Availability
The convert.exe command is an external command and is available in the below Microsoft operating systems.Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Converts FAT volumes to NTFS.CONVERT volume /FS:NTFS [/V]
volume | Specifies the drive letter (followed by a colon), mount point, or volume name. |
/FS:NTFS | Specifies that the volume to be converted to NTFS. |
/V | Specifies that Convert should be run in verbose mode. |
Examples
convert d: /fs:ntfs
Convert the d: drive, which in this example is a FAT volume, to a
NTFS volume. Note, if this volume is anything other than FAT, such as
NTFS or RAW,
this command will generate an error.
About copy
Availability
The copy command is an internal command and is available in the below Microsoft operating systems.All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
Copies one or more files to another location.COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination] [/A | /B]] [/V] [/Y | /-Y]
source | Specifies the file or files to be copied. |
/A | Indicates an ASCII text file. |
/B | Indicates a binary file. |
destination | Specifies the directory or filename for the new file(s). |
/V | Verifies that new files are written correctly. |
/Y | Suppresses prompting to confirm you want to overwrite an existing destination file. |
/-Y | Causes prompting to confirm you want to overwrite an existing destination file. |
To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).
Examples
copy *.* a:
Copy all files in the current directory to the floppy disk drive.
Note: If there are hidden files they will not be copied. To copy all files
including hidden files use the xcopy command.
copy autoexec.bat c:\windows
Copy the autoexec.bat, usually found at root, and copy it into the windows directory; the autoexec.bat can be substituted
for any file(s).
copy win.ini c:\windows /y
Copy the win.ini file in the current directory to the windows
directory. Because this file already exists in the windows directory it
normally would
prompt if you wish to overwrite the file. However, with the /y
switch you will not receive any prompt.
copy "computer hope.txt" hope
Copy the file "computer hope.txt" into the hope directory.
Whenever dealing with a file or directory with a space, it must be
surrounded with
quotes. Otherwise you'll get the "The syntax of the command is incorrect." error.
copy myfile1.txt+myfile2.txt
Copy the contents in myfile2.txt and combines it with the contents in myfile1.txt.
copy con test.txt
Finally, a user can create a file using the copy con command as shown above, which creates the test.txt file. Once the above command has been typed in, a user could type in whatever he or she wishes. When you have completed creating the file, you can save and exit the file by pressing CTRL+Z, which would create ^Z, and then press enter. An easier way to view and edit files in MS-DOS would be to use the edit command.
About ctty
Availability
The ctty command is an internal command and is available inMS-DOS 5.0 and above
Windows 95
Windows 98
Windows NT
Syntax
Changes the terminal device used to control your system.CTTY device
device | The terminal device you want to use, such as COM1. |
Available MS-DOS devices for CTTY:
AUX
COM1
COM2
COM3
COM4
CON
LPT1
LPT2
LPT3
NUL
COM1
COM2
COM3
COM4
CON
LPT1
LPT2
LPT3
NUL
Examples
ctty aux
Moves the input and output to a remote terminal connected to the auxiliary port.
ctty con
Moves the input and output back to the main terminal. This would be typed from a remote terminalWarning: Using CTTY NUL will disconnect the computer display and keyboard from the screen and not allow you to reconnect the input and output from a remote terminal.
If you like my post's please leave me a comment. and i'll post "Microsoft DOS and command prompt 04" soon.
See ya all later.!
By - DeadCode
No comments:
Post a Comment