6

I know this isn't strictly a programming related question, but I cannot seem to find an answer.

In what year was Batch created? Or is it more appropriate to talk about the year CMD was created? In which case - in what year was CMD created?

I apologize if this question is against the rules in any way. The reason I ask is to participate in a challenge over at the Code Golf StackExchange site.

Community
  • 1
  • 1
unclemeat
  • 5,029
  • 5
  • 28
  • 52

4 Answers4

7

Do you need to distinguish the command.com and cmd.exe ?

Command.com - was the command line interpreter from the earliest versions of DOS and QDOS created by Tim Paterson (around 1981) , but the command.com also passed through a lot of changes and may be the most drastic in its 5th version.

MSDOS 1.0 supported commands - (CD COPY DEL DIR EDIT FORMAT HELP MKDIR RD REN TYPE )

In MSDOS 5.0 (1991) more advanced commands were introduced - (even microsoft keeps a documentation for it) and may be its a little bit closer to a programing language.

In 1993 Windows NT was released packed with the new cmd.exe (along with the old command.com) created by Therese Stowell - it has a lot new features like additional switches for FOR and IF commands , subroutines and etc. And this is the 'modern' batch-scripting what we know today (though it is close to the ms-dos 5 command.com).

This has cost me some time in googling but hope the info is enough :)

npocmaka
  • 55,367
  • 18
  • 148
  • 187
3

The earliest reference to batch files is 1981, with the release of IBM PC DOS 1.0 - it used the file AUTOEXEC.BAT to run various commands at startup.

And imo this question falls into a grey area regarding whether or not it's on-topic; there's no specific programming question, but it's still related to programming, and that's apparently okay according to the review audit that I recently failed.

SomethingDark
  • 13,229
  • 5
  • 50
  • 55
1

MSDos was based on CP/M features for compatability. Unix type features added in in Ver 2. CMD started as a command shell that would run MSDos batch files but have added features in OS/2 (IBM not MS did CMD). CMD got taken into NT and there are two main versions pre Win 2000 and post Win 2000. Prior to Windows 2000 Dos batch files and programs ran in the OS/2 sub system, not the Dos emulator in the Windows sub system.

The command.com in Windows now is ver 5.5 and passes all commands to cmd to execute unless started like this command.com /k ver (compare that to typing command.com then ver).

Serenity
  • 174
  • 3
1

I don't remember exactly when I bought my first PC computer, but it should be around 1984 or 1985; it was a "PC clone" Printaform computer that featured MS-DOS 2.11 with Batch files executed by command.com program. I vividly remember that the Batch features of that time were enough to write many interesting programs. It had variable management via SET command and %variable% value replacement, and FOR, IF and CALL commands, including recursive subroutines.

Shortly after that I read an article in Dr. Dobb's Journal that show me how to modify command.com's environment variables from a running program, so I wrote my first program of this type, LET.COM, that allowed me to perform advanced variable management in Batch files, like arithmetic operations, data input, etc. many years before the modern cmd.exe Batch file features.

You may review the history of MS-DOS development, including Batch file features, in many sites in the web, like this one in Wikipedia.

Aacini
  • 65,180
  • 12
  • 72
  • 108