Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


listing folders and files

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,306
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> listing folders and files
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 listing folders and files - 7/31/2001 1:56:11 AM   
  ylapidot

 

Posts: 1
Score: 0
Joined: 7/31/2001
From:
Status: offline
how can i list folders and files
 
 
Post #: 1
 
 Re: listing folders and files - 7/31/2001 2:30:23 AM   
  pedx

 

Posts: 16
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
ylapidot,

Test this code on your server


<html><head>
<title>fileobjects.asp</title>
</head><body>
<%
mypath="/learn/test"

Set filesystem = CreateObject("Scripting.FileSystemObject")
Set folder = filesystem.GetFolder(server.mappath(mypath))

Set filecollection = folder.Files
For Each file in filecollection
response.write file.name & "<br>"
Next

set filesystem=nothing
set folder=nothing
set filecollection=nothing
%>
</body></html>

(in reply to ylapidot)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> listing folders and files Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts