6

so, I've long been afraid to refer to "that language you use in batch files and in the cmd shell" by name. It's embarrassing to admit that i don't know what it is called anymore.

The only term I've ever heard for it is "DOS" but I don't want to open myself up to responses like "DOS is an OS", or "DOS is 16bit and hasn't run on windows since '06", or "DOS uses command.com, but CMD is the VDM" or some such (not that this has actually happened, just social anxiety...).

So can someone clue me in on what the modern terminology for the language you put in MS .bat files is?

Frank Thomas
  • 36,135
  • Microsoft uses “Open a Windows command. … “ – John Mar 16 '23 at 00:27
  • 2
    What a great question. I call it "command batch".. but I bet I too am incorrect. Funny timing too.. I took a "MS-DOS" tag out of a question this very day. – Señor CMasMas Mar 16 '23 at 00:27
  • you type 'commands' in a command prompt. a batch file processes a batch of commands. – Joep van Steen Mar 16 '23 at 00:37
  • 4
    Microsoft DOS prompt hasn’t been used since Windows 3.1, and Windows ME, like literally, Windows transitioned to the NT kernel with Windows XP. DOS prompt(s) don't even exist on the NT kernel. The command prompt has never properly been referenced as the DOS prompt. The syntax, in many cases, is different. Command Prompt scripting language is a batch not to be confused with bash. – Ramhound Mar 16 '23 at 00:47
  • I don't think it really has a name; the last name widely used for the language used in Windows command shell was "batch". It's not very specific (after all, it really just means "a bunch of commands"), but better than saying "DOS" - which as you correctly note is very silly (shortened from "DOS prompt", i.e. the CLI for DOS and surviving long after DOS had nothing to do with the Windows terminal or command). "Command batch/file" is sometimes used to distinguish from the older-style .bat scripts. Powershell doesn't have a name for the language either. – Luaan Mar 16 '23 at 08:51
  • I would suggest also asking this on https://retrocomputing.stackexchange.com which is full of experts with vast amount of expertise with this stuff as well (I mean, "real" MS-DOS). If you do, please post a link here, thanks. – kostix Mar 16 '23 at 12:09
  • My take is that's its a "Batch command language". To disambiguate it from that of a more modern Windows shell, which is PowerShell, I'd call it "Windows batch command language"—unless it's not clear from the context that you're referring to Windows. (Note that the .BAT extention actually refers to the word "batch", and the control structures supported by the cmd.exe interpreter were specifically created to support "batch" execution—that is, more than a single command, possibly with looping and conditionals.) – kostix Mar 16 '23 at 12:12
  • @SeñorCMasMas, thank you for the kindness. it appears that the consensus is that you are right! – Frank Thomas Mar 16 '23 at 13:47
  • Thanks everyone for your contributions. it appears clear that the general consensus is that in the case of the windows cli, the shell and the language put in it are one and the same. "Windows Command line interface" a terrible name for a language (and I hate poorly named things), but its the one we have. Thanks again! – Frank Thomas Mar 16 '23 at 13:53

2 Answers2

6

According to Wikipedia and other sources, one can consider this "language" to be the command line interface, CLI, and is common in many different operating systems. For a more specific term, the same source suggests one can also call it the "command line interpreter."

This latter suggestion is more easily understood, in my opinion and would not necessarily require more explanation.

"I use the command line interpreter to run (insert program name here) with parameters," or "I created a batch file to run from the command line interpreter."

fred_dot_u
  • 2,650
  • 2
    Generic "[shell] scripting languages"? There's PowerShell, too, and Linux has its scripting languages, such as fish, KornShell, Bourne shell and bash. https://en.wikipedia.org/wiki/Shell_script Perhaps a nonproliferation treatise should be written -- but in what language? – DrMoishe Pippik Mar 16 '23 at 01:43
  • @DrMoishePippik, lolz! So my take on it is that all the common linux shells all execute a language called sh with varying dialectics, regardless of whether its bash, ksh, csh, etc, so I guess I'm wishing to make an identifying distinction between the command language and the shell itself, though it does appear that most of the commenters and answers are leaning toward the idea that the shell IS the language you type into it. I suppose that makes sense, but a lot of the modern shells can really blur that line. – Frank Thomas Mar 16 '23 at 03:41
  • @fred_dot_u, thinking of it as a command line interpreter does draw a clearer line, for sure, but when we name it "the windows command line interface", then that starts to conflict with all the other command shells that windows offers (powershell, cscript, wscript, winrm, etc). there are lots of CLI languages that could be run on windows OOB, without even getting into the add-on interpreters like python. it seems odd that just this one would not have a name. but I see where you are coming from so +1 (and good link)! – Frank Thomas Mar 16 '23 at 03:52
  • @FrankThomas It seems similar to how Microsoft calls its SQL server "SQL Server", as if it were the only one. – JoL Mar 16 '23 at 13:16
  • @JoL, your point is not lost on me, but ironically, kind of exemplifies the point of my query. we use the "shell" SSMS to access the SQL server, but the code we put into it is MS Transact-SQL (TSQL). – Frank Thomas Mar 17 '23 at 15:44
1

Microsoft documentation seems to call cmd.exe language Command Shell or Windows Commands, as opposed to PowerShell or Windows Script (wscript/cscript) languages. In the older (MS-DOS) documentation, the language is referred to as Batch Commands.

I don't think the difference in names is intentional though. In my experience those names (Command Shell / Batch Commands) can be used interchangeably, and you need to specify the OS if you refer to a specific version of the language.