Difference between revisions of "Windows Command Shell"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m
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 prompt from within Microsoft Windows can be accomplished in different ways depending on what version of Microsoft Windows you are using.   
  
== command.com ==
+
 
 +
 
 +
== 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 11:
 
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 MS-DOS access on Windows XP!
Line 18: Line 22:
  
 
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".
 +
 +
 
 +
 +
== 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:Computer Technology]]
 
[[Category:Microsoft]]
 
[[Category:Microsoft]]

Revision as of 10:03, 17 October 2007

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 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 MS-DOS 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 MS-DOS shell from Windows NT, 2000, XP, or 2003 then execute “cmd.exe.”

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.

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".

 

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