ismilelots
08-08-2005, 11:47 PM
I got this script that will list all the files in my folder on my website and link to them. I was wondering how I can modify it to strip off the 1st 2 numbers in the name? (they are only there for my filing purposes and have nothing to do with the file name).
Maybe even replace them with an icon?
Your help would be greatly appreciated.
**** The Code ******
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(Server.MapPath(Fldr))
Response.Write("<ul>")
For Each x In fo.files
If Right(x.Name,3)="pdf" Then
Response.Write("<li><a href=""" & Fldr & x.Name & """>" & Mid(x.Name,1,InStr(x.Name, ".")-1) & "</a></li>")
End If
Next
Response.Write("</ul>")
Maybe even replace them with an icon?
Your help would be greatly appreciated.
**** The Code ******
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(Server.MapPath(Fldr))
Response.Write("<ul>")
For Each x In fo.files
If Right(x.Name,3)="pdf" Then
Response.Write("<li><a href=""" & Fldr & x.Name & """>" & Mid(x.Name,1,InStr(x.Name, ".")-1) & "</a></li>")
End If
Next
Response.Write("</ul>")