Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
DOS equivalent of UNIX 'which'?
Name: FritzTheCat Date: March 26, 2009 at 02:08:39 Pacific OS: Windows XP Subcategory: General
Comment:
Is there a DOS/XP equivalent of the UNIX 'which' command? I've found several lists of DOS/UNIX equivalent commands, but which is never among them.
Name: Ed in Texas. Date: March 26, 2009 at 02:20:41 Pacific
Reply:
FritzTheCat, 'if/then' or 'if/then/else'? HTH. Ed in Texas.
0
Response Number 2
Name: FritzTheCat Date: March 26, 2009 at 03:09:55 Pacific
Reply:
No, the 'which' command in UNIX is used to find the first location of a file in the current PATH. For example, 'which perl' might return /usr/local/bin/perl.
0
Response Number 3
Name: wanderer Date: March 26, 2009 at 08:09:33 Pacific
Reply:
closest I think you can get to which is the dir command
c:\>dir filename.ext /s
This will list the file sought and its path. You would have to determine which was the shortest path.
0
Response Number 4
Name: kptech Date: March 26, 2009 at 12:01:55 Pacific
Reply:
Here's a site that's ported several unix utilities, including "which" to DOS:
Summary: Yes Doc, that would have worked fine, except I had things set up "like I liked them" when I upgraded to XP. It's a little more tricky to dual boot, or set up to dual boot, AFTER the XP is upgraded, s...