Subscribe to Windows IT Pro
May 07, 2002 12:00 AM

Whereis for Windows

Windows IT Pro
InstantDoc ID #24971
Rating: (2)
Downloads
24971.zip

Where did the Whereis command of yesterday go? A little innovative use of Windows 2000's lesser-known shell capabilities makes the recreation of this utility simple. The Whereis utility script, which Listing 1 shows, finds the location of a program whose name you type at the command line. The script also shows duplicate copies of system tools or batch files that have the same name as a program that you're trying to execute. The script, which works similarly to UNIX's Which command and DOS's whereis.exe command, not only finds the command that executes when you type it at the command line but also finds any other commands on the path that are potential collision victims (i.e., an executable that might run when you intend to run a batch file of the same name). This script works in Windows XP, Win2K, and Windows NT.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.