Find all folders with specific files in them?

4

1

This is on Windows-7.

I need to find all folders with specific files in them and list them preferably in Explorer. Is it at all possible, I seem to have hard time figuring this. This probably can be done from cmd or powershell, but I would prefer to have it done from within Explorer.

The search criteria is simply "all folders containing files with extension .ini".

Damien K

Posted 2012-05-07T16:56:27.383

Reputation: 41

Answers

0

PowerShell:

Get-ChildItem *.ini -Recurse -Force -ea Silent | Select DirectoryName

enter image description here

Keith Miller

Posted 2012-05-07T16:56:27.383

Reputation: 1 789

0

  1. Open Computer (aka My Computer)
  2. Navigate to c:\folder
  3. In the upper right, you will see a search box, with gray wording: Search folder
  4. input: *.ini and press enter

You will now see of all ini files in this directory and it's subdirectories.

jftuga

Posted 2012-05-07T16:56:27.383

Reputation: 2 877

Well, this far I got myself, but this gives me the list of files. What I need is a list of directories containing those files in search criteria. – Damien K – 2012-05-07T17:54:54.160

0

You might be able to solve your problem using PowerShell. I am not home at the moment and have no access to PowerShell, so I can check this solution inspired by this page at a later time only.

dir -recurse | ?{$_.name -match “^*.ini$”} | sort name | ft directory

I can check up on the correctness of the answer later.

Andreas

Posted 2012-05-07T16:56:27.383

Reputation: 454