C++ : loop on all files of a folder (and its subdfolders) : simplest solution? -
what's shortest solution make loop on .mp3 files of folder (and subdfolders) c++, os=windows? if possible, i'd avoid 3rd party things, such boost, if not possible, i'll use these 3rd party things (if easy install).
thanks in advance.
(ps: i'm sure question very common, , surely answered, after 10 minutes of search, haven't found useful.)
c++ have no function getting files or folders in folder, since os specific.
boost best if want cross-platform compatibility, windows @ answer here: how can list of files in directory using c or c++?
simply replace
printf ("%s\n", ent->d_name);
with check on last 4 characters of ent->d_name see if ".mp3" , want file.
Comments
Post a Comment