p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: Directory File List

Message #1 by "Rick Agrella" <RickA@m...> on Mon, 24 Sep 2001 18:14:14
avoid posting across may lists.  there are allot of us on each of these 
lists, and are willing to help you on the one list..not all of them.

try avoid posting full HTML files to the list...you have the background set 
to black, and my email client shows the full email as a blank, black 
emaill...not very pleasing...only post relevant code.


did you even read or consider my previous email regarding outputting links 
Your code:

for Each objFile in objFolder.Files
                 Response.Write "<a href =" & mArtist  & "\" & mAlbum & 
"\"  & objFile.ShortName & ">" & objFile.Name & "</a>" & "<BR>"

It is NOT in the indicated format which i instructed you.  This is your 
problem.  Please read responses to your questions before posting 
again.  This is very annoying.

here is the header of my response..in case you deleted it...

To: "Beginning ASP" <beginning_asp@p...> Subject: Re: 
[beginning_asp] FileSystemObject????
easily done:
<a href="somefile that has a space in it.asp">link 1</a>
<a href="somefile that has a space in 
it.asp?someotherfile=<%=server.urlencode("my params with a space")%>">link 
...how can you tell its monday...


At 06:14 PM 9/24/2001 +0000, you wrote:
>I want to list all the files in a certain directory and make a link out of
>them. The name shows up fine but when the link is made it does not see the
>entire name of the file if it has spaces in it. Heres my code
><%@ Language = VBScript %>
><% dim filename Set mArtist = Request.QueryString("artist") Set mAlbum = 
>Request.QueryString("album") DirName = ("D:\FTProot\My Music\" & mArtist & 
>"\" & mAlbum)
>Set objFSO = Server.CreateObject("Scripting.FileSystemObject") set 
>objFolder = objFSO.GetFolder(DirName) Set objFiles = objFolder.Files for 
>Each objFile in objFolder.Files Response.Write 

  Return to Index