Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Contents of a SEARCHED folder 1

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US

Thanks to Palbano, I was able to make the code below work. Now I'm trying to make the same code, display the contents of the folder found... Thanks in advance.


<%
mySearch = Request(&quot;search&quot;)
Set fs=Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
If fs.FolderExists(mySearch) = false Then
Response.Write(&quot;<h1>Folder &quot; & mySearch & &quot; does not exist.</h1>&quot;)
Else
Response.Write(&quot;<h1>Folder &quot; & mySearch & &quot; exists.</h1>&quot;)
End If
set fs=nothing
%>
QUOTE OF THE DAY
The only ideas that will work for you are the ones you put to work.
<%
Jr Clown
:eek:)
%>
 
I think this will work.
Once you know the folder exists.

<%
Set folder = fs.GetFolder(mysearch)
Set files = folder.Files
For Each file in files
filist = filist & file.name
filist = filist & &quot;<BR>&quot;
Next
Response.Write filist
%>

Try that out and let me know.

Pandyon
 
Thank you very much for your help Pandyon.

Jr Clown
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top