title: how to check if a specific file extension exists in a folder using powershell?
body: <p>I have a root directory that consists of many folders and sub folders. I need to check whether a particular file like *.sln or *.designer.vb exists in the folders or subfolders and output the result in a text file.</p>
  
  <p>For Eg:</p>
  
  <pre><code>$root = "C:\Root\"
  $FileType = ".sln",".designer.vb"
  </code></pre>
  
  <p>the text file will have result somewhat like below:</p>
  
  <pre><code>.sln ---&gt; 2 files
  .sln files path ----&gt; 
  c:\Root\Application1\subfolder1\Test.sln
  c:\Root\Application2\subfolder1\Test2.sln
  </code></pre>
  
  <p>Any help will be highly appreciated!</p>
  
  <p>Regards,
  Ashish    </p>