Pure ASP hyperlink for all files in a folder

posonty

New Member
I recently had a project and couldn't find simple code anywhere.. hope this helps someone!Make sure to set NTFS permissions for the IIS app account on the folder. Use file:// for files http:// for a direct and others for relative links. \[code\]<%dim fs,fo,xset fs=Server.CreateObject("Scripting.FileSystemObject")set fo=fs.GetFolder("C:\Path")for each x in fo.filesResponse.Write("<a href=file:///" &x & ">" & x & "</a>" & "</br>")nextset fo=nothingset fs=nothing%> \[/code\]
 
Back
Top