1. How to get file names without their paths?
The al_get_fs_entry_name() return the full path+name of a file or directory, not only the name.
Is it possible to get only the name or do I simply have to trim the string myself? What I get is: "mods\AAL2D\gfx\ingame\blood.png" and what I want: "blood.png".
2. Can I filter the result on specific file extensions?
In A4 it was possible to filter the result by entering a specific file extension into al_findfirst().
I do not see anything like that in A5 when looking in the manual and examples. Do I have to filter this myself by comparing last part of string?
1. How to get file names without their paths?
2. Can I filter the result on specific file extensions?
If you click on your own link al_findfirst(), it gives an example of searching for pcx files.
There is an al_get_path_basename() function, if you want something more portable than basename. You would then have to create (and destroy) a temporary ALLEGRO_PATH.
You can use the path routines. al_get_path_filename() will get the filename.
A5 does not provide a way to filter by extension.
And if you already have an ALLEGRO_PATH for the file, you can use al_get_path_extension() to get the extension
Arthur: I know that you filter with al_findfirst() but it is an A4 function and does not exist in A5 which I've moved over to.
Ok, thank guys for the answers. I'll use the al_get_path... functions to get the name and to filter on the extension.