how do I access only image files from a directory ?(Note: directory path is being stored in the in character pointer) .the piece of code which you are going to paste should also work when any image file extension is removed.example suppose there is a Image file nature.jpg and if the extension is removed the code should work still.