Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > show all files in the directory, but how to show directory control??

Reply
Thread Tools

show all files in the directory, but how to show directory control??

 
 
strutsng@gmail.com
Guest
Posts: n/a
 
      09-30-2005
I want to write an asp page that allows the user to choose the
directory, and it will show all files in that directory.
I used the tag <input type="file">, but this is for selecting a file,
not directory.

<form action="process.asp" method="post">
<p><input type="file" name="mydir">
<p><input type="submit">
</form>

'process.asp
<%
dim fs,fo,x,mydir
set fs=Server.CreateObject("Scripting.FileSystemObject ")
mydir = Request.Form("mydir")
set fo=fs.GetFolder(mydir)
for each x in fo.files
Response.write(x.Name & "<br />")
next
set fo=nothing
set fs=nothing
%>


any ideas? please advise. thanks!!

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-30-2005
wrote on 30 sep 2005 in microsoft.public.inetserver.asp.general:

> I want to write an asp page that allows the user to choose the
> directory, and it will show all files in that directory.
> I used the tag <input type="file">, but this is for selecting a file,
> not directory.
>
> <form action="process.asp" method="post">
> <p><input type="file" name="mydir">


type="text" [this is the default, so you cna leave it out]

> <p><input type="submit">
> </form>
>
> 'process.asp
> <%
> dim fs,fo,x,mydir
> set fs=Server.CreateObject("Scripting.FileSystemObject ")
> mydir = Request.Form("mydir")
> set fo=fs.GetFolder(mydir)
> for each x in fo.files
> Response.write(x.Name & "<br />")
> next
> set fo=nothing
> set fs=nothing
> %>
>
>
> any ideas? please advise. thanks!!
>
>




--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
show all files in the directory, but how to show directory control?? strutsng@gmail.com ASP General 1 09-30-2005 07:32 AM
Authentication enabled for all but a single directory or file. UJ ASP .Net 2 08-08-2005 05:37 PM
list all css files in a directory and sub directory TJS ASP .Net 1 06-23-2004 10:49 AM



Advertisments