Find Folder Location with DIR


How to find a folder location with DIR command?



You can use the "DIR dir_name /AD /S" command to locate a folder by the folder name.

  • "dir_name" - Specifies the folder name you are looking for. "?" and "*" wildcard characters are supported.
  • "/AD" option - Tells Windows to display entries with the "D (Directory or folder)" Attribute.
  • "/S" option - Tells Windows to display entries in sub-directories recursively.

For example, if you are looking for the location where Chrome is installed on your computer, you can use these command:

C:\>cd \

C:\>dir *chrome* /AD /S

 C:\Program Files (x86)\Google
    <DIR>          Chrome

 C:\Program Files (x86)\Java\jre6\lib\deploy\jqs\ff
    <DIR>          chrome

    <DIR>          Chrome

 C:\Users\fyicenter\AppData\Local\Google\Chrome\User Data\Default\Storage\ext
    <DIR>          chrome-signin


Using Batch Commands

Find File with Partial Name with DIR

Windows Command Examples

⇑⇑ Windows Batch File Tutorials

2018-01-31, 210👍, 0💬