Short, Self Contained, Correct Example
Before you next decide to dump 500 lines of code on us and ask us to play hunt the wumpus.

> while (fscanf(fpFilePointer, "%s", cpMediafileName) == 1)
This will fail miserably on the first filename with a space.

You already use \n as a much less likely to appear in a filename anyway, so use that.

Your mass of meaningless global variables isn't helping.