Tech Tips / Windows NT / Tools and Tasks

Searching for network shares with NET VIEW

You can use the NET VIEW command-line utility to display a list of a computer's network shares. However, if a server or workstation has several or perhaps even dozens of shares, the list may scroll off your screen. Obviously, you can prevent the list from scrolling by piping the list results through the MORE command, but you would still have to search through a long list for the share you seek. Instead, try piping the NET VIEW results through the FIND command, and specify a search string of characters that appears in the name of the share you're looking for.

Consider the following command where %computername% is the name of the target computer and %string% is the search string:

  NET VIEW \\%computername% | find "%string%"

With this command, a list of only the target computer's shares that contain the characters found in the search string will be displayed.

For example, NET VIEW \\server1 | find "docs" will find any shares on Server1 containing docs. (Keep in mind that the search string is case sensitive.)

Contact Us | Authors | Subject Index | Directory | RSS Feeds

Copyright ©2006 Setup32.com