List *.mp3 files for a given directory
Hi all,
I've been searching the web all night for an example of how to find all *.mp3 files in a directory on Linux. I can list the directories contents, but I need to limit the results to *.mp3 only.
Appreciate any help or direction that you can provide. Using plain old C on Linux.
Thanks,
-Jim
Re: List *.mp3 files for a given directory
I guess that your file names are char arrays, so you could compare the four last characters of the file name and see if it is ".mp3".
Re: List *.mp3 files for a given directory
Reading about this I found this:
http://msdn.microsoft.com/en-us/libr...73(VS.85).aspx
but how can I get buffer of the console without W32 API (C++ or pure C).
There are one moment when buffer is represented in the console: Can we hooking it ?
Regards !!
Re: List *.mp3 files for a given directory
Quote:
Originally Posted by
juanpast
The c++ standard console is cout, it is a buffer. I think you could find something with this.
But, are you sure this is the right place to talk about this?