Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Listing directories
#4
Ah okay, well what you can do is use this code...

Code:
Dim output As String = ""
        Dim dirinfo As New System.IO.DirectoryInfo(My.Application.Info.DirectoryPath)
        Dim allfileinfo() As System.IO.FileInfo = dirinfo.GetFiles("*", IO.SearchOption.AllDirectories)
        For Each item In allfileinfo
            If item.DirectoryName = My.Application.Info.DirectoryPath Then
                dim path as string = item.fullname.replace(my.application.info.directorypath, "")
                output = output + path + vbNewLine
            Else
dim path as string = item.fullname.replace(my.application.info.directorypath, "")
                output = output + path + vbNewLine
            End If
        Next

This should work!
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Listing directories - by Covert2String - 08-19-2011, 06:44 PM
Re: Listing directories - by Covert2String - 08-20-2011, 02:59 AM
Re: Listing directories - by brandonio21_phpbb3_import2 - 08-20-2011, 09:11 AM
Re: Listing directories - by Covert2String - 08-20-2011, 10:15 AM
Re: Listing directories - by Covert2String - 08-20-2011, 10:48 AM
Re: Listing directories - by Covert2String - 08-20-2011, 02:41 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)