Hello. I want to code a C program that can list my files and directories. Even just listing only directories or only files can do for beginning. I use Linux, I've found an example but it was written using dir.h library which is not recognized by gcc. I have never tried coding such a program before.
It would be great if you can push me in the right direction, tell me what to search in google or send me some pdf's
Thank you clargs
This post has been edited by clargs: 26 May 2008 - 02:14 PM
You are right I've never thought of that.
OK then it would be much better for me to find a nice middle level way to get the list of my files.
Actually I'm aiming to code a program that finds and lists all my mp3 files and writes them in to a database. In linux the music players cannot handle my music archive (~150 GB) the programs I've tried gave errors or just freeze (I've tried like every music player which has library support). So I've decided to write a program (i can write it in other languages but I want to do it in C (maybe C++) to learn how to do it) that writes my mp3's path and names in mysql and after that I'll try to do a music library program...
So I really want to find a way to list my files (recusively?)