I have a function that reads filenames from directories. I want to extract these names, put them in an array for later use, fullname, namepart and extension part (3 different arrays). My function is able to write fullname and namepart NOT the extensions. Can anybody help me, here is my code extract; token 1 can be copied into the array, but copying token 2 results in segmentation fault; I have a function that reads filenames from dir