Windows Command Shell

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search

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