Depending on the fixed-length, a couple of entries were correct in allFilenames but only emptyness afterwards.
We'd need to see the code, and the output. But, there should be no waffling around about the size to use. The file name should be in 8.3 format, so the fixed array size, to hold the 8 characters before the . plus the terminating NULL, should be 9 elements. I never use odd lengths for arrays, and just to have a little margin, I'd use 16 for the size (so that it could hold the entire name (8 + 1 + 3 + 1) with room to spare).