Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to get the file list in a directory?

Status
Not open for further replies.

heo83

Junior Member level 3
Junior Member level 3
Joined
Jul 7, 2004
Messages
25
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
226
I have a directory name My music and I want to print all the songs titles in that folder. There are many titles so I can't type. I know C, but it can not get the long file name. Does anyone here know how?
Using Visual C++ or VBasic is OK, C is rather good.
Thanks for reading
 

VB(A) sample using FileSystemObject :

Set fso = CreateObject ("Scripting.FileSystemObject")
Set f = fso.GetFolder("C:\mydir")
For Each file In f.Files
MsgBox f.Name
Next
 

    heo83

    Points: 2
    Helpful Answer Positive Rating
MsgBox f.Name must be : MsgBox file.Name
sorry for the mistake :oops:
 

For dos look for the dir.h declared functions .
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top