Skyrimfus

List all files,folders,subfolders to treeview

6 posts in this topic

#1 ·  Posted

Hi.

Is there a way i can list all folders,subfolers and all the files that they contain to a treeview.

e.g if i wanted to list everything from C:\users\Me\Desktop

i would get a treeview of  the folders and items that are in thoose folders.

 

Thanks

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

Skyrimfus,

My ChooseFileFolder UDF (look in my sig for the link) is designed to do just that.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

16 minutes ago, Melba23 said:

Skyrimfus,

My ChooseFileFolder UDF (look in my sig for the link) is designed to do just that.

M23

Thanks, this works to an extent. Is there any way that I can export the data into a file and then load it up later?

Edited by Skyrimfus

Share this post


Link to post
Share on other sites

#4 ·  Posted

Skyrimfus,

The standard _FileListToArrayRec function will give you a listing of all the folders and files on the path - _FileWriteFromArray will let you save it.

You could then re-read the dat using _FileReadToArray, but the problem with reloading the data is that for a tree of any size, it takes a loooong time to create the required TreeView. This is why my ChooseFileFolder UDF only expands the tree as the user opens the branches.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

2 minutes ago, Melba23 said:

Skyrimfus,

The standard _FileListToArrayRec function will give you a listing of all the folders and files on the path - _FileWriteFromArray will let you save it.

You could then re-read the dat using _FileReadToArray, but the problem with reloading the data is that for a tree of any size, it takes a loooong time to create the required TreeView. This is why my ChooseFileFolder UDF only expands the tree as the user opens the branches.

M23

Thank you! Will test this and come  back with results!

Share this post


Link to post
Share on other sites

#6 ·  Posted

Skyrimfus,

When you do reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - I know what I wrote and it just pads the thread unnecessarily.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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