Listview view sub folders

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Listview view sub folders
AnoPem
Hello i know how to open a folder in listview but i want it to show the sub folders in the selected folder, can anyone show me how this is done?
Last edited by AnoPem on Fri Mar 09, 2012 3:03 pm, edited 1 time in total.
https://t.me/pump_upp
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Listview view sub folders
MrAksel
Code: Select all
        Dim d As DirectoryInfo = New DirectoryInfo("Directory path")

        For Each f As FileInfo In d.GetFiles("*.*", SearchOption.AllDirectories)
            ListView1.Items.Add(f.Name)
        Next
You can modify it to fit your needs
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Re: Listview view sub folders
AnoPem
MrAksel wrote:
Code: Select all
        Dim d As DirectoryInfo = New DirectoryInfo("Directory path")

        For Each f As FileInfo In d.GetFiles("*.*", SearchOption.AllDirectories)
            ListView1.Items.Add(f.Name)
        Next
You can modify it to fit your needs
Thank you works like a charm
https://t.me/pump_upp
3 posts Page 1 of 1
Return to “Tutorial Requests”