||urgent|| find file or something

hi, i have a problem, i have nothing and i dont know where or how to start
what i need is a program that displays all the folders in a directory in a listbox and then searches to see if it has a .wav file in it
if a .wav file exists then the program should display a done caption next to the folder name, if a .wav file dosnt exist then it should display a not done caption next to the folder name


any help would be great, even if it is just a little bit of code to start from


(p.s i am very new to vb programming)
LVL 4
--laser--Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

-extreme-Commented:
im a little lost.. but this may help out..

create a drive box... name is drive1
create a directory box.. name is dir1
create a filelist box... name is file1

go to your filelist box.. properties>pattern. put in... *.wav (or *.filetypeext)

open the drive box script.. put in

Private Sub Drive1_Change()
Dir1 = Drive1
End Sub

open up the directory script.. put in

Private Sub Dir1_Change()
File1 = Dir1
End Sub

when your done.. it should display if a .wav file is in the directory...

"if a .wav file exists then the program should display a done caption next to the folder name, if a .wav file dosnt exist then it should display a not done caption next to the folder name" i dont know about that.. right now.
--laser--Author Commented:
this is good except i need it to show the names of all the folders in a directory
-extreme-Commented:
umm.. the dir1 box should list all the folders in there. or do you mean something else? explain.
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

--laser--Author Commented:
sorry i wasnt clear, i no that dir1 displays the folders, but i need them in like a listbox or something

--laser--Author Commented:
give me your email address and i will send you a screenshot of what i mean
--laser--Author Commented:
if you go into windows explorer then click on the view menu, then press details, up the top you will see a bar that you can use to resize the columns, that is what kind of list i want
vinnyd79Commented:
What you want is a ListView Control.It is part of Microsoft Windows Common Controls.

Try this,add a ListView Control and then right click the control and change the View to - 3 lvwReport.Then under the column headers tab use the insert column button to insert 2 columns.

Then add a reference to Microsoft scripting runtime and add a command button:


Private Sub Command1_Click()
Dim fso As New FileSystemObject
Dim fMainFolder As Folder
Dim fSubFolder As Folder
Dim fFile As File
Dim liItem As ListItem
Dim sPath As String

sPath = "C:\Somedir"

ListView1.ListItems.Clear

Set fMainFolder = fso.GetFolder(sPath)

For Each fSubFolder In fMainFolder.SubFolders
   Set liItem = ListView1.ListItems.Add(, , fSubFolder.Name)

If Dir$(sPath & "\" & fSubFolder.Name & "\*.wav") <> "" Then
    liItem.SubItems(1) = "Done"
Else
    liItem.SubItems(1) = "Not Done"
End If

Next fSubFolder

End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
--laser--Author Commented:
you are a legend thank you so much, now that i see the code i could have done it myself but i just didnt know where to start, thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.