Getting a list of directories/subdirectories on a client machine

Posted on 2005-04-21
Last Modified: 2012-08-13
How can I (on a web page in get a listing of directories on the client machine?  I want the user to be able to search the local drives on the client machine and finally be able to choose a directory name (which I will then use to do some processing).

Ideally I would like the BROWSE capability when using the <input type=file> to upload files.

Question by:pmacmann
    LVL 23

    Assisted Solution

    > Ideally I would like the BROWSE capability when using the <input type=file> to upload files.

    You answer your question already, thats the only option you have.

    You CAN NOT browse Client Directory / Files programaticly, its a security violation, imagine i write  a programe search for all jpg files and copy them over to my Server.
    LVL 13

    Accepted Solution

    adilkhan is absolutely right about the security issue, but you can do it something like that if you use ActiveX which is only/strictly for IE

    Author Comment

    OK - thanks... I'll have to think of  another solution.. I need the user to browse to a directory, then I take that directory name and parse out some information and then look in the directory for a specific file... I could probably have the user browse to the file in the directory and then get the directory name from there ...
    LVL 13

    Expert Comment

    as I said you can do it

    var fso, dir, file;
    fso=new ActiveXObject("Scripting.FileSystemObject")

    there's whole lot more you can do with FSO

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now