<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Tech-Recipes - Latest Comments in PowerShell: Quick Way to Check for a File Type on a Drive or Directory | Windows | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Sat, 09 Jun 2007 16:31:08 -0000</lastBuildDate><item><title>Re: PowerShell: Quick Way to Check for a File Type on a Drive or Directory | Windows | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/2397/powershell_quick_way_check_file_type/#comment-2770722</link><description>does it have to be powershell? without installing powershell, you can use vbscript&lt;br&gt;&lt;code&gt;Set objFSO = CreateObject&amp;#40;&amp;quot;Scripting.FilesyStemObject&amp;quot;&amp;#41;&lt;br&gt;myFolder=&amp;quot;c&amp;#58;&amp;quot;&lt;br&gt;Set objFolder = objFSO.GetFolder&amp;#40;myFolder&amp;#41;&lt;br&gt;GoSubFolders objFolder&lt;br&gt;&lt;br&gt;Sub GoSubFolders &amp;#40;objDIR&amp;#41;&lt;br&gt;  If objDIR &amp;lt;&amp;gt; &amp;quot;System Volume Information&amp;quot; Then&lt;br&gt;    MainSub objDIR&lt;br&gt;    For Each eFolder in objDIR.SubFolders&lt;br&gt;      GoSubFolders eFolder&lt;br&gt;    Next&lt;br&gt;  End If&lt;br&gt;  &lt;br&gt;End Sub&lt;br&gt;&lt;br&gt;Sub MainSub &amp;#40;objDIR&amp;#41;&lt;br&gt;  For Each efile in objDIR.Files&lt;br&gt;    WScript.Echo &amp;quot;File &amp;quot;, eFile, &amp;quot;is a &amp;quot;, eFile.Type&lt;br&gt;  Next&lt;br&gt;End Sub&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;save it as .vbs extension, type cscript myscript.vbs</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 09 Jun 2007 16:31:08 -0000</pubDate></item><item><title>Re: PowerShell: Quick Way to Check for a File Type on a Drive or Directory | Windows | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/2397/powershell_quick_way_check_file_type/#comment-2770721</link><description>Can this be done recursively? In other words, can I test-path for all files in the path and every subdirectory of the path?&lt;br&gt;&lt;br&gt;btw, thanks for a great blog.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 09 Jun 2007 15:21:53 -0000</pubDate></item></channel></rss>