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 24th, 2003, 09:38 AM
blodefood blodefood is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 37 blodefood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 36 m 15 sec
Reputation Power: 6
Question displaying filenames from same folder in different cells

I have six Excel spreadsheets in a folder. I would like to display the three filenames as hyperlinks that start with W in one table cell and the ones that start with M in the other table cell.

My code (see below) successfully displays ALL the files in the folder, but only in one table cell. I need a second code to go in the second table cell to display the M files. I have commented my code, so I trust this helps to define better what I am trying to accomplish.

Help is always appreciated.

Thanks,
blodefood


<table>
<tr>
<td>

<%dim strPath

strPath = "D://Wwwroot/test/ID01/"

dim oFS, oFile, oFolder, oFolderContents, slot, variablename
varname=left(oFile,1)

Set oFS = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFS.getFolder(strPath)

for each oFile in oFolder.files

'create function to read first char in filename
'if filename starts with W then display in weekly column
'if filename starts with M then display in monthly column

%>

'This code creates the list of hyperlinks to each of the files.

<A href="<%response.write oFile.Name%>">
<%response.write oFile.Name%></a><br>
</td>


<td>
<%
'I need the second code for M files here.
%>
</td>
</tr>
</table>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > displaying filenames from same folder in different cells


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
Stay green...Green IT