Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObject Coverage?

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
in a previous post, you'll notice the same function, only difference this time, is that I am not using my ActiveX dll I created, instead, I am going to attempt to make the ASP perform the same task, the place I am stuck at is the GetFileVersion command in the FSO, the Page says it doesnt support that type but MSDN says it does for Visual Basic Scripting. any clue?<br><br><FONT FACE=monospace><br>&lt;%<br>&nbsp;if not IsEmpty(Request.Form(&quot;Path&quot;)) then<br>&nbsp;&nbsp;Path = Request.Form(&quot;Path&quot;)<br>&nbsp;&nbsp;set fs = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)<br>&nbsp;&nbsp;if fs.FolderExists(Path) then<br>&nbsp;&nbsp;&nbsp;Set fsFol = fs.GetFolder(Path)<br>&nbsp;&nbsp;&nbsp;Set fsFiles = fsFol.Files<br>&nbsp;&nbsp;&nbsp;%&gt; &lt;Table border=1&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;For each fsFile in fsFiles<br>&nbsp;&nbsp;&nbsp;&nbsp;ObjectPath = fsFile.path<br>&nbsp;&nbsp;&nbsp;&nbsp;FileExt = fs.GetExtensionName(ObjectPath)<br>&nbsp;&nbsp;&nbsp;&nbsp;If LCase(FileExt) = &quot;dll&quot; or LCase(FileExt) = &quot;ocx&quot; or LCase(FileExt) = &quot;exe&quot; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;TR&gt;&nbsp;&nbsp;&lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;TD&gt; &lt;%=fsFile.name%&gt; &lt;/TD&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;TD&gt; &lt;%=fs.GetFileVersion(fsFile.path)%&gt; &lt;/TD&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;/TR&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;end if<br>&nbsp;&nbsp;&nbsp;next<br>&nbsp;&nbsp;&nbsp;%&gt; &lt;/Table&gt; &lt;%<br>&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;Response.Write &quot;&lt;Font Size=+3 color=#FF0000&gt;That path does not exist&lt;/FONT&gt;&quot;<br>&nbsp;&nbsp;end if<br>&nbsp;end if<br>%&gt;<br></font> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top