Thursday, November 21, 2024
HomeWindowsWindows: List Shared Drives and Folders from the Command Line

Windows: List Shared Drives and Folders from the Command Line

Want a quick list of shared drives and folders on your Windows PC or Server? By using the Windows Instrumentation command-line interface (WMIC) you can create a quick list or even generate a text file or HTM file for printing. This Tech-Recipe applies to Windows XP Professional, Windows Vista, Windows Server 2003 and Windows Server 2008.


1. Open a command prompt.

2. Execute the following command:
wmic share get caption,name,path

A list of all shared drives and folders will appear, including the path for each shared folder.

If you want to generate a text or HTM file for printing, execute the following:

to generate a textfile:
/output:d:\Shared.txt share get caption,name,path

to generate a HTM file:
/output:d:\Shared.htm share get caption,name,path

make sure to change the location and filename(d:\Shared.txt or d:\Shared.htm) to the desired values.

Rob Rogers
Rob Rogers
Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!