Jump to content
Sign in to follow this  

Folder structure in TreeView

Recommended Posts



i want to make a program that create a list structure of a drive and all of folders and files in it,then show all of them in a tree view.

i wrote some code that create a list of first level of my drive and all files and folder in it, but i don't now how can do that for all subfolder and files in it. (like dir /s)

sombody can help me?

also i want to save this structure in a file, and next time load it to treeview!

is it difficult?

i am waiting...

my simple code for test :


#include <GUIConstants.au3>
#Include <File.au3>
#Include <Array.au3>
#Include <GuiTreeView.au3>
for $i= 1 to $filelist[0]

While 1
    if  $msg=$GUI_EVENT_CLOSE then Exit

func searchinside($searchstring)
        if IsArray($filelist2) Then
            for $j=1 to $FileList2[0]

Share this post

Link to post
Share on other sites

Are you trying to get it to look like "FileOpenDialog"?... If so, you might take a look at FileGetAttribute(), and get ready for some string parsing fun :lmao:.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post

Link to post
Share on other sites

I want to make a program to save a drive structure (with all files and folders in all levels) in a text file (and also show it in a treeview) that i can load it later for compare .

I need somthings like 'Folder Bar' in 'My Computer' (Include files).

I can do that for first level of drive, my problem is subfolders and other levels.

Sombody here can help me?

I wrote a simple example (Without Save\Load Function). i Hope it help other to understand what i need.

I am waiting...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.