Reputation: 9272
Is there a language, similar to what CoffeeScript is to JavaScript, that compiles to the language of the windows batch|cmd|command line?
The cmd versions I refer to are the ones based on NT, especially XP sp3 and up.
Upvotes: 6
Views: 648
Reputation: 358
Yes there is one language called Batsh, which compiles to both Bash and Windows Batch.
Project: https://github.com/BYVoid/Batsh
Online demo: http://batsh.byvoid.com/
Upvotes: 9
Reputation: 32576
As far as I know, what you're asking for doesn't exist, although it would be possible to create such a language, and it would be an intersting exercise.
The alternative is other languages that are also "built-in" to the OS.
Others have mentioned PowerShell, which is very powerful, and is built in, I think, in Win7 and up.
The other alternative is the Windows Script Host for which you can write scripts in VBScript and/or Javascript. It's built-in to WinXP and up.
Upvotes: 2
Reputation: 1102
Just for your edification, CoffeeScript is a domain specific language built on JavaScript, so you could in theory intermingle the two. I am not aware of such a language for batch files. The windows powershell might be worth a look see.
Upvotes: 1