Difference between revisions of "Windows Command Shell"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
(New page: Access to an MS-DOS prompt from within Microsoft Windows can be accomplished in different ways depending on what version of Microsoft Windows you are using. == command.com == For Windo...)
 
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
Access to an MS-DOS prompt from within Microsoft Windows can be accomplished in different ways depending on what version of Microsoft Windows you are using.   
+
Access to an [[MS-DOS]] like console from Microsoft Windows NT based systems can be accomplished in different ways depending on what version of Microsoft Windows you are using.  The MS-DOS Internal command interpreter is no longer used.  If you are on a Windows XP or Windows 7 computer you can access an emulated MS-DOS console with many of the familiar [[MS-DOS]] commands.
  
== command.com ==
+
The Windows command shell provides direct communication between the user and the operating system. The non-graphical command shell user interface is the environment in which you can run character-based applications and utilities.  The Windows XP/Vista/7 command shell uses the command interpreter Cmd.exe, which loads applications and directs the flow of information between applications, to translate user input into a form that the operating system understands.
 +
 
 +
 
 +
 
 +
== Command Interpreters: command.com versus cmd.exe ==
 +
 
 +
=== command.com ===
  
 
For Windows 95/98/ME access to a DOS command shell could be accomplished by running 'command.com' from the Start Menu, and selecting Run.  However, you should not use 'command.com' in a Windows NT environment, including Windows NT/2000/XP/2003 and upward.
 
For Windows 95/98/ME access to a DOS command shell could be accomplished by running 'command.com' from the Start Menu, and selecting Run.  However, you should not use 'command.com' in a Windows NT environment, including Windows NT/2000/XP/2003 and upward.
Line 7: Line 13:
 
Don’t use command.com on Windows XP
 
Don’t use command.com on Windows XP
  
== cmd.exe ==
+
=== cmd.exe ===
  
Use cmd.exe for MS-DOS access on Windows XP!
+
Use cmd.exe for the command shell access on Windows XP!
  
 
The DOS interpreter command.com may be launched from the GUI environment to provide an interface to the MS-DOS prompt.  This is the correct way to access the prompt from Windows 95, 98, and Millennium Edition.  It is not correct for any of the NT derivatives of Microsoft Windows.
 
The DOS interpreter command.com may be launched from the GUI environment to provide an interface to the MS-DOS prompt.  This is the correct way to access the prompt from Windows 95, 98, and Millennium Edition.  It is not correct for any of the NT derivatives of Microsoft Windows.
  
If you wish to access the MS-DOS shell from Windows NT, 2000, XP, or 2003 then execute “cmd.exe.
+
If you wish to access the command shell from Windows NT, 2000, XP, or 2003 then execute "cmd.exe."  Although this is not really MS-DOS, or even a DOS, it provides the familiar environment with the MS-DOS command set.
  
The old command.com is deprecated under NT operating systems, and although it will provide a shell, it is not a full MS-DOS shell.  For example, Doskey will not be loaded, ANSI.SYS will not be loaded, and cmd.com does not support long filenames.
+
The old command.com is deprecated under NT operating systems, and although it will provide a shell, it is not a full command interpreter nor is it true MS-DOS shell.  For example, Doskey will not be loaded, ANSI.SYS will not be loaded, and it does not support long filenames.
  
 
For example, if you wanted to access "My Documents" in command.com you would need to type "cd mydocu~1". However, if you wanted to access the same directory through the cmd.exe shell you could type "cd my documents".
 
For example, if you wanted to access "My Documents" in command.com you would need to type "cd mydocu~1". However, if you wanted to access the same directory through the cmd.exe shell you could type "cd my documents".
  
 +
The ambiguous usage of the term DOS or MS-DOS to describe the modern command shell (cmd.exe) in Microsoft Windows tends to annoy some.  Often, the term DOS is used to describe accessing the Win32 console object command line shell available in modern Windows.  It may not be technically correct, however, it has nonetheless become commonplace.
 +
 +
 
 +
 +
== DOS FTP ==
 +
 +
=== Batch FTP Upload ===
 +
 +
By using the "mget/mput" commands along with a wildcard filename, you
 +
can get or put multiple files with DOS FTP. Below is an example.
 +
 +
ftp> mput *.html
 +
 +
Our example uploads all *.html files to the server.  You have to verify
 +
every file's upload by typing, "y" or "n".  There is a way around this.  Use
 +
the "-s:filename" switch of DOS FTP.
 +
 +
The "-s" switch tells DOS FTP to use a text file as input instead of the
 +
command prompt. All you have to do is put the commands you want DOS FTP to
 +
execute in the text file. Below is an example. (Note: Replace the "[**]" with
 +
your info.)
 +
 +
open [*your.ftp.server*]
 +
[*your_login*]
 +
[*your_password*]
 +
lcd C:\myhtmlfiles
 +
mput *.html
 +
y
 +
y
 +
y
 +
[*as many 'y's as there are HTML files to transfer*]
 +
bye
 +
 +
C:\>ftp -s:mysiteftp.txt
 +
 +
 +
 
 +
 +
 
 +
 +
[[Category:Computer Technology]]
 
[[Category:Microsoft]]
 
[[Category:Microsoft]]
 +
[[Category:Windows]]
 +
[[Category:DOS]]
 +
[[Category:MSDOS]]

Latest revision as of 09:08, 5 March 2015

Access to an MS-DOS like console from Microsoft Windows NT based systems can be accomplished in different ways depending on what version of Microsoft Windows you are using. The MS-DOS Internal command interpreter is no longer used. If you are on a Windows XP or Windows 7 computer you can access an emulated MS-DOS console with many of the familiar MS-DOS commands.

The Windows command shell provides direct communication between the user and the operating system. The non-graphical command shell user interface is the environment in which you can run character-based applications and utilities. The Windows XP/Vista/7 command shell uses the command interpreter Cmd.exe, which loads applications and directs the flow of information between applications, to translate user input into a form that the operating system understands.

 

Command Interpreters: command.com versus cmd.exe

command.com

For Windows 95/98/ME access to a DOS command shell could be accomplished by running 'command.com' from the Start Menu, and selecting Run. However, you should not use 'command.com' in a Windows NT environment, including Windows NT/2000/XP/2003 and upward.

Don’t use command.com on Windows XP

cmd.exe

Use cmd.exe for the command shell access on Windows XP!

The DOS interpreter command.com may be launched from the GUI environment to provide an interface to the MS-DOS prompt. This is the correct way to access the prompt from Windows 95, 98, and Millennium Edition. It is not correct for any of the NT derivatives of Microsoft Windows.

If you wish to access the command shell from Windows NT, 2000, XP, or 2003 then execute "cmd.exe." Although this is not really MS-DOS, or even a DOS, it provides the familiar environment with the MS-DOS command set.

The old command.com is deprecated under NT operating systems, and although it will provide a shell, it is not a full command interpreter nor is it true MS-DOS shell. For example, Doskey will not be loaded, ANSI.SYS will not be loaded, and it does not support long filenames.

For example, if you wanted to access "My Documents" in command.com you would need to type "cd mydocu~1". However, if you wanted to access the same directory through the cmd.exe shell you could type "cd my documents".

The ambiguous usage of the term DOS or MS-DOS to describe the modern command shell (cmd.exe) in Microsoft Windows tends to annoy some. Often, the term DOS is used to describe accessing the Win32 console object command line shell available in modern Windows. It may not be technically correct, however, it has nonetheless become commonplace.

 

DOS FTP

Batch FTP Upload

By using the "mget/mput" commands along with a wildcard filename, you can get or put multiple files with DOS FTP. Below is an example.

ftp> mput *.html

Our example uploads all *.html files to the server. You have to verify every file's upload by typing, "y" or "n". There is a way around this. Use the "-s:filename" switch of DOS FTP.

The "-s" switch tells DOS FTP to use a text file as input instead of the command prompt. All you have to do is put the commands you want DOS FTP to execute in the text file. Below is an example. (Note: Replace the "[**]" with your info.)

open [*your.ftp.server*]
[*your_login*]
[*your_password*]
lcd C:\myhtmlfiles
mput *.html
y
y
y
[*as many 'y's as there are HTML files to transfer*]
bye

C:\>ftp -s:mysiteftp.txt