ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 31st, 2003, 05:50 PM
tlcable7 tlcable7 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Salt Lake City, UT
Posts: 9 tlcable7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Scripting.FileSystemObject

Can anybody tell me how to access the names of files in a given folder using the Scripting.FileSystemObject?

I have a page that allows me to upload files to a folder called /uploads/. I would then like to populate a dropdown list with the names of all the files in that /uploads/ directory.

Any help is greatly appreciated.

Travis Cable
travis@bridgewebdesign.com

Reply With Quote
  #2  
Old October 31st, 2003, 11:46 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,824 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 19 h 27 m 21 sec
Reputation Power: 765
<%
Dim fs, fldr, fil
set fs = server.createobject("Scripting.FilesystemObject")
set fldr = fs.GetFolder("pathToFolder")
for each fil in folder
response.write fil.name
next
%>

Untested, you'll have to change the response.write to output the appropriate html for a dropdown box.

http://msdn.microsoft.com/library/e...ystemObject.asp

Reply With Quote
  #3  
Old November 2nd, 2003, 06:27 PM
pda8333 pda8333 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 216 pda8333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 5
you can try my coding here, as i just post it up recently. you can just add in the dropdown code.

http://forums.devshed.com/t94684/s.html
__________________
Hope this helps.

Mike
Royal Selangor Pewter

"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)

Reply With Quote
  #4  
Old November 3rd, 2003, 10:29 AM
tlcable7 tlcable7 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Salt Lake City, UT
Posts: 9 tlcable7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Working Great

Thank you both very much, it is working out great.

Travis Cable

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Scripting.FileSystemObject


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway