CodeAve.com CodeAve.com - ASP - Read/Write
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


Directory Contents (Text)
Need to see all the files in a directory on your webserver, but have directory browsing disabled on your webserver? This script will generate a text view of all directory contents (files and sub-directories). Just change server.mappath("directories/")) to server.mappath("your directory /")) Note: A filter is applied to remove all MSFrontPage 2000 directories ending in _cnf from the output.
View the Output
Text View
Print View
Mail this Link
Download the Code

Folders
<br>
<%
Set directory=server.createobject("scripting.filesystemobject")
Set allfiles=directory.getfolder(server.mappath("directories/"))

' Lists all the files found in the directory
For each directoryfile in allFiles.subfolders
%>
<% ' Removes certain MSFrontPage was directories 
if right(directoryfile.Name,3) <> "cnf" then %>

<a href="directories/<% =directoryfile.Name %>" target="_blank">
<% =directoryfile.Name %></a>
<br>
<% end if %>
<% Next %>

<br>
Files
<br>
<% ' Lists all the files found in the directory
For each directoryfile in allFiles.files %>

<a href="directories/<% =directoryfile.Name %>">

<% =directoryfile.Name %></a>
<br>
<% Next %>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3