3 ms·
There's no mention of error handling, which is what really makes Windows batch files completely hopeless for anything involving more than one or two commands. B
by ptx 12y ago
There's no mention of error handling, which is what really makes Windows batch files completely hopeless for anything involving more than one or two commands. Being able to write code with exceptions and having it compiled to the corresponding mess of ERRORLEVEL and GOTO would be sweet!
(I've switched to just writing everything in JavaScript for WSH. It's ECMAScript 3 and the API has some issues, but it's still a million times better than trying to write any logic in batch.)
- tracker1 12y agoIve leaned towards node.js for a couple years now in windows.. with edge.js I get about anything I could ask for.... You can also put a thin shim to launch node for the script in case it's in a wsh environment.
- roryokane 12y agoLink to Edge.js: https://github.com/tjanczuk/edge https://github.com/tjanczuk/edge WSH is Windows Script Host: https://en.wikipedia.org/wiki/Windows_Script_Host https://en.wikipedia.org/wiki/Windows_Script_Host