VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Good Example for read all File Names from any directory and linking it on one page Using Content Li

by Michael Highguy (7 Submissions)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Tue 6th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Good Example for read all File Names from any directory and linking it on one page Using Content Linking Component

Rate Good Example for read all File Names from any directory and linking it on one page Using Content Li



<%dim MyFso, MyDir, MyFile, LinkObj, Count
set MyFso = Server.CreateObject("Scripting.FileSystemObject")
set MyDir = MyFso.GetFolder(Server.MapPath("Script/"))
set MyFile = MyFso.CreateTextFile(Server.MapPath("info.txt"),true)
for each FileName in MyDir.Files
MyFile.WriteLine "Script\" & FileName.Name & vbTab & "Size of File=" & FileName.Size
next
MyFile.Close
set LinkObj = Server.CreateObject("MSWC.NextLink")
Count = LinkObj.GetListCount("info.txt")
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<Table border=1>
<%for i = 1 to Count%>
<tr>
<td><a href=<%=LinkObj.GetNthURL("info.txt",i)%>><%=LinkObj.GetNthURL("info.txt",i)%></a></td>
<td><%=LinkObj.GetNthDescription("info.txt",i)%></td>
</tr>
<%next%>
</table>
</BODY>
</HTML>


Download this snippet    Add to My Saved Code

Good Example for read all File Names from any directory and linking it on one page Using Content Li Comments

No comments have been posted about Good Example for read all File Names from any directory and linking it on one page Using Content Li. Why not be the first to post a comment about Good Example for read all File Names from any directory and linking it on one page Using Content Li.

Post your comment

Subject:
Message:
0/1000 characters