List files of a directory in client side

H

Hamed

Dear Folks

I am programming a page that asks user a directory name and lists files
of type *.xls in the directory in client's machine. He/She will then
select some files to upload them to the server.

Is there any way to ask a directory name and then list the files of
that directory in client's machine? The typical browser that is used is
IE but I am not allowed to use ActiveX objects.

I found http://tinyurl.com/a4hhs the message talked about it but it
seems it is about server side file listing not client side.

Any help is highly appreciated.

Regards
 
V

VK

Is there any way to ask a directory name and then
list the files of that directory in client's machine?
The typical browser that is used is
IE but I am not allowed to use ActiveX objects.

No.

You can:
1) Use properly signed Java swing applet with JFileChooser.

2) Buy a 3rd party signed object/plugin.

In both above cases you're still dependable on user decision - grant
permissions or not.

3)
<form method="post" action="action.cgi" enctype="multipart/form-data">
Please choose XLS files you want to download:<br>
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
...
</form>
 
A

ASM

Hamed said:
Dear Folks

I am programming a page that asks user a directory name and lists files
of type *.xls in the directory in client's machine. He/She will then
select some files to upload them to the server.

Is there any way to ask a directory name

because you know exactly the path of this directory ?
on a foreign machine ?
and then list the files of
that directory in client's machine? The typical browser that is used is
IE but I am not allowed to use ActiveX objects.

I found http://tinyurl.com/a4hhs the message talked about it but it
seems it is about server side file listing not client side.

all what I know is
<form>
Select a file <imput type=file> and validate (button)
</form>
 
T

Thomas 'PointedEars' Lahn

Hamed said:
I am programming a page that asks user a directory name and lists files
of type *.xls in the directory in client's machine. He/She will then
select some files to upload them to the server.

Is there any way to ask a directory name and then list the files of
that directory in client's machine?

Yes, use

<input
type="file"
name="..."
accept="application/vnd.ms-excel,application/msword">.

It may not filter for Excel files as it should, but at least the user
can select the file. And, more important, it works with plain HTML.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top