Two versions of dos command prompt

  • Thread starter Thread starter jackson6612
  • Start date Start date
  • Tags Tags
    Dos
Click For Summary
The discussion centers on the differences between the "cmd" and "command" prompts in Windows. "command.com" is identified as the original 16-bit DOS prompt, while "cmd.exe" is the 32-bit version designed to emulate it in later Windows environments. A user seeks clarification on the syntax for the COPY command, noting discrepancies in the Wikipedia article regarding the use of "from" and "to." It is clarified that the correct syntax does not include these terms. For copying multiple files, the use of wildcard characters like "*" is recommended, allowing users to specify groups of files based on their extensions or naming conventions. The importance of using the "help copy" command for further guidance is also mentioned.
jackson6612
Messages
334
Reaction score
1
Hi

If I write the command "cmd" I get a different version of Command Prompt from when I enter the command "command". More or less they're the same but start with different 'initial' command string. What's the difference between the two? Please help me. Thanks.

Video:
 
Last edited by a moderator:
Technology news on Phys.org
command.com is the original dos prompt, cmd.exe is the native dos prompt.

google turns up lots of info on this.
 
This Wikipedia article http://en.wikipedia.org/wiki/List_of_DOS_commands explain the COPY command as such:

copy

Copies files from one location to another. The destination defaults to the current directory. If multiple source files are indicated, the destination must be a directory, or an error will result.

Syntax:
copy from [source\filename] to [destination\folder]

1: But the syntax with "from" and "to" doesn't work. One has to do without the two. Does Wikipedia have it wrong, or is it me who is interpreting it wrongly?

2: How do I indicate multiple files instead of one, I mean what would be the syntax look like then?

Please help.
 
command.com is the 16bit command prompt used in DOS(which was 16bit), and that cmd.exe is the 32bit executable meant to emulate command.com for the later 32bit Windows.
 
jackson6612 said:
2: How do I indicate multiple files instead of one, I mean what would be the syntax look like then?
As far as I remember, multiple files could be indicated with the wildcard "*" character. For example, *.txt would refer to all files (in the current directory) with a .txt extension. Or a*.* would refer to all files beginning with the letter a. And *.* means all files.
 
jackson6612 said:
1: But the syntax with "from" and "to" doesn't work. One has to do without the two. Does Wikipedia have it wrong, or is it me who is interpreting it wrongly?
Some combination, but you can edit it if you think it's unclear. You can always type help copy into the prompt for the usage anyway.


As far as I remember, multiple files could be indicated with the wildcard "*" character. For example, *.txt would refer to all files (in the current directory) with a .txt extension. Or a*.* would refer to all files beginning with the letter a.
Just tested this and yeah it works as expected. For example, if you've got a list of data files by year and you only want files from the 90s, you'd do
copy "*199*" dest
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

Replies
7
Views
1K
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
7K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K