A collection of scripts for MS DOS\Windows' cmd.exe interpreter.
These command line scripts have been gleaned and collected from the internet, or built to satisfy my needs for an external command / script. The main reason for these scripts is that they can work with the system as-is, requiring the least amount of installed files, or even none, and therefore useful for installation / network scripts, or in business environments, where installation capabilities may be restricted. The majority of these scripts are under the MIT license.
Script that replaces the Unix command which, which prints the full path of an executable file present in the %PATH%. It is useful to find the path of installed files, or detect if a different version of an expected command is executed when called.
Command | version | command.com DOS / Win16 / Win32s Win9x / Win32c |
cmd.exe Win9x / Win32c |
cmd.exe NT 4.0 |
cmd.exe NT 5.x (Windows 2000/XP) |
cmd.exe NT 6.x~10.x (Vista/7/8/8.1/10) |
powershell.exe NT 6.x~10.x (Vista/7/8/8.1/10) |
---|---|---|---|---|---|---|---|
which.cmd | 0.3 | ✗ | ? | ✓ | ✗ |