Link to home
Start Free TrialLog in
Avatar of RySk8er30
RySk8er30

asked on

Displaying Local Directory Information

Hi,

I want to display directory information for the user's LOCAL computer via a web application.  I wrote the following code...

--------------------------------------------------------------------------------------------------------
        Dim dir As String = "C:\"
        Dim files, dirs As String()
        Dim fileName, directoryName As String

        If Directory.Exists(dir) Then

            dirs = Directory.GetDirectories(dir)
            files = Directory.GetFiles(dir)

            For Each fileName In files
                lblFiles.Text += fileName & ", "
            Next

            For Each directoryName In dirs
                lblDirectories.Text += directoryName & ", "
            Next

        Else

            lblError.Text = "Invalid directory: " & dir

        End If
--------------------------------------------------------------------------------------------------------

This lists the files on the web server.  Is there any way to list the local files on a user's computer?

Ryan

Avatar of AerosSaga
AerosSaga

In short, no this is a security risk

Regards,

Aeros
ASKER CERTIFIED SOLUTION
Avatar of pillbug22
pillbug22

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RySk8er30

ASKER

I would like to delete this question since I have not recieved an answer.

Ryan
You can post a message in the Community Support area and request a delete.

Although receiving an unwanted/unfavorable answer isn't the same as not receiveing an answer.
I agree you got the answer
I agree with AerosSaga and pillbug22.  An answer that states that a reasonable solution is not possible or unlikely, although not what the person posing the question wanted, is still an answer!
My previous post indicates my position.

Regards,

Aeros
Ditto.
RySk8er30 has chosen to award the points.

RomMod
Community Support Moderator