VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



List All Directories And Sub-Directories Into A Listbox

by CovertLoop (12 Submissions)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

This will list all the directories and subdirectories on your hard drive into a listbox.
Vote if ya wanna.

Inputs
Don't Forget The Declarations
Assumes
Don't Forget The Declarations
Code Returns
Don't Forget The Declarations
Side Effects
Don't Forget The Declarations
API Declarations
Sub Listdir(path)
Dim d(1000)
Dir1.path = path
For lop = 0 To Dir1.ListCount - 1
d(cnt) = Dir1.List(lop)
cnt = cnt + 1
Next lop
For lop = 0 To cnt - 1
List1.AddItem d(lop)
cur_depth = cur_depth + 1
listdir d(lop)
Next lop
cur_depth = curr_depth - 1
End Sub

Rate List All Directories And Sub-Directories Into A Listbox

Add the declarations mentioned above, then put this in when you want it to run:
Listdir ("C:\")

Download this snippet    Add to My Saved Code

List All Directories And Sub-Directories Into A Listbox Comments

No comments have been posted about List All Directories And Sub-Directories Into A Listbox. Why not be the first to post a comment about List All Directories And Sub-Directories Into A Listbox.

Post your comment

Subject:
Message:
0/1000 characters