Link to home
Start Free TrialLog in
Avatar of isaackhazi
isaackhazi

asked on

OpenFileDialog Multiple files GET Name, Extension and path

I have a simple question.

I have set the OpenfileDialog.Multiple = true

Now I need to iterate through the Selected files and save the File NAme, Extension and full Path to a table.

Please see code below.

IN the following approach : I can iterate and get only the Path/File Name or extansion.

How can I iterate and get all the three fields.
OpenFileDialog1.ShowDialog()
        Dim file As String
        If OpenFileDialog1.ShowDialog = DialogResult.OK Then
            For Each file In OpenFileDialog1.FileNames

                ds.Tables("Temp").Rows.Add(file,(File Name),(Extension))

            Next
            GridControl1.DataSource = ds.Tables("Temp")
        End If

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

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
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