which - given a full or base filename, tells which executeable in the PATH would be executed.
works on NT boxes, but should also work for 9x/ME. also a DOS version.
Copyright © 2006,2007,2008 Jim Michaels
02/02/2011 02:52 PM 237,390 which.zip SHA512 C:\prj\which\which.zip bcc79598bc917da9 c8b8f14cced6595e 0b6e79d2ee06f719 c8bd0229c1a23d86 f26d9c5fd0748350 71772e534a2b4ece cc4871650645fb70 4fdae278b4cd4a20 MD5 C:\prj\which\which.zip b8a9ce2b90cdf50240f9ce1106f7c3be
which - given full or base filename, tells which executeable in the PATH would be executed. usage: which [/?] [[-]-?] [/h[elp]] [[-]-h[elp]] [[-]-v[er[sion]]] [/v[er[sion]]] usage: which filename [filename ...] This program finds where the executable (filename) is in the PATH which it would be executed in if you were to execute it. Extension not necessary. In other words, it tells you the path of which of many executeables would be running. For example, I have many compilers installed, each of which has their own version of make.exe, and at different times one of them is in the path first. this uld tell you which one. no arguments, or /? or -? or --? or --help or --h or -h or -help or gives this help. /v or or /ver or /version or -v or --v or -ver or --version gives you the version number. Example: which mode Example: which mode.com l50.exe attrib autoexec Example: which kernel32 Example: which kernel32.dll user32 Example: which kernel32.dll wmp.ocx This executeable works with Windows, and differs from the DOS version in that it supports more extensions, and attempts a read from the registry. Both of these will give you nearly the same result unless there is no .com file but there is a .exe, .bat, .pif, .cmd, .dll file or a .ocx file and you are o T/2000/XP/Vista/7/8. If no extension is specified, these file extensions are searched for in the following order: .com, .exe, .bat, .pif, .cmd, .dll, .ocx. The program takes the list from the windows nt registry and expands on it by making a list out of it and adding .dll, and .ocx - if you are on windows 98, th cmd extension is not included and the entries are hard-coded. Copyright 2006-2009,2011 Jim Michaels. Under GPL3 license. which - given full or base filename, tells which executeable in the PATH would be executed. usage: which [/?] [[-]-?] [/h[elp]] [[-]-h[elp]] [[-]-v[er[sion]]] [/v[er[sion]]] usage: which filename [filename ...] This program finds where the executable (filename) is in the PATH which it would be executed in if you were to execute it. Extension not necessary. In other words, it tells you the path of which of many executeables would be running. For example, I have many compilers installed, each of which has their own version of make.exe, and at different times one of them is in the path first. this wo uld tell you which one. no arguments, or /? or -? or --? or --help or --h or -h or -help or gives this help. /v or or /ver or /version or -v or --v or -ver or --version gives you the version number. Example: which mode Example: which mode.com l50.exe attrib autoexec This executeable works on DOS, and differs from the Windows version in that it only supports .COM, .EXE, and .BAT, (fewer extensions) in that order, and does no t read from the registry. If no extension is specified, these file extensions are searched for in the following order: .com .exe .bat Copyright 2006-2009,2011 Jim Michaels. Under GPL3 license. usage is very simple, really, C:\prj\which\which-1.7\dos>which df l50 c:\djc\bin\df.exe c:\u\l50.exe C:\> C:\prj\which\which-1.7\dos>which kernel32.dll kernel32.dll not found in ( c:\djc\bin c:\djc\libexec\gcc\djgpp\4.41 c:\djc\libexec\gcc\djgpp\4.41\INSTAL~1 c:\djc\gnu\emacs\bin c:\djc\gnu\emacs\lib-src c:\MIE7D8~1\mingw64\bin c:\MI7C9A~1\mingw32\bin C:\gnuwin32\GETGNU~1\bin C:\gnuwin32\GETGNU~1\gnuwin32\sbin C:\gnuwin32\GETGNU~1\gnuwin32\bin C:\Perl\site\bin C:\Perl\bin C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\system32\WBEM C:\PROGRA~1\PHP\ C:\PROGRA~1\PHP c:\u c:\x c:\PROGRA~1\7-zip c:\bin C:\PROGRA~1\Csound\bin C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\ C:\PROGRA~1\CMAKE2~1.8\bin C:\PROGRA~1\COMMON~1\HP\DIGITA~1\bin C:\PROGRA~1\HP\DIGITA~1\bin\ C:\PROGRA~1\HP\DIGITA~1\bin\Qt\QT43~1.3 C:\PROGRA~1\WinMerge C:\PROGRA~1\OPENAX~1\bin C:\PROGRA~1\NOTEPA~1\ c:\tsepro ) C:\prj\which\which-1.7\dos>which which .\which.exe C:\prj\which\which-1.7\dos>cd ..\win C:\prj\which\which-1.7\win>which kernel32 C:\WINDOWS\system32\kernel32.dll C:\prj\which\which-1.7\win>which user32 C:\WINDOWS\system32\user32.dll C:\prj\which\which-1.7\win>which wmp C:\WINDOWS\system32\wmp.dll C:\prj\which\which-1.7\win>which wmp.ocx C:\WINDOWS\system32\wmp.ocx C:\prj\which\which-1.7\win>which gw .\gw.cmd C:\prj\which\which-1.7\win>which l50 c:\u\l50.exe C:\prj\which\which-1.7\win>which fg fg not found in ( c:\djc\bin c:\djc\libexec\gcc\djgpp\4.41 c:\djc\libexec\gcc\djgpp\4.41\install-tools c:\djc\gnu\emacs\bin c:\djc\gnu\emacs\lib-src c:\mingw-w64-bin_i686-mingw_20101003_sezero\mingw64\bin c:\mingw-w32-bin_i686-mingw_20101003_sezero\mingw32\bin C:\gnuwin32\GetGnuWin32\bin C:\gnuwin32\GetGnuWin32\gnuwin32\sbin C:\gnuwin32\GetGnuWin32\gnuwin32\bin C:\Perl\site\bin C:\Perl\bin C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\system32\WBEM C:\Program Files\PHP\ C:\Program Files\PHP c:\u c:\x c:\program files\7-zip c:\bin C:\Program Files\Csound\bin C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\ C:\Program Files\CMake 2.8\bin C:\Program Files\Common Files\HP\Digital Imaging\bin C:\Program Files\HP\Digital Imaging\bin\ C:\Program Files\HP\Digital Imaging\bin\Qt\Qt 4.3.3 C:\Program Files\WinMerge C:\Program Files\OpenAxiom\bin C:\Program Files\Notepad++\ c:\tsepro ) C:\prj\which\which-1.7\win>which df c:\djc\bin\df.exe
biolerplate
gcc compiler note: -fpack-struct cannot be used with iostream or anything to do with libstdc++ (including locale which includes iostream) without getting lots of errors.
The dos version is compiled with DJ Delorie's djgpp (gcc for DOS). It can be obtained at DJDelorie.com/djgpp.
The windows version was compiled with Borland C++ 5.5 (free edition). It is available at article (may include patches), free compiler (requires regisration).
The windows version was also compiled with MinGW 5.1.4 which is a GNU compiler set for windows. it has the peculiarity that it requires any use of __int64 to #include <basestd.h>, and it also doesn't allow 64-bit constants in the microsoft/borland style of appending i64 to the number. it requires you to use the gcc LL instead, however, printf does use %I64d rather than the normal gcc %lld. If you use %lld, your program will crash and do the DrWatson error report thing.
PHP is a programming language used for web page development and for applications and is available at http://php.net
ArgoUML is a UML diagramming tool used for designing programs and is available at http://argouml.tigris.org
Copyright 2006,2007,2008,2009 Jim Michaels.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.