Do you mean every 5th file, so file 5, 10, 15 and so on?
If you are using PowerCenter I can provide you a solution based on also reading the filename by checking the checkbox "Add Currently Processed Flat File Name Port" in the properties tab of the source (indirect source).
After the source qualifier you need an expression with all the ports (including the flatfile name port).
Below the filename port (CurrentlyProcessedFileName) you can add 3 additional ports which need to be in the exact same order.
var_prev_filename (string 255).
var_file_number IIF(CurrentlyProcessedFileName = var_prev_filename, var_file_number, var_file_number + 1)
In a following filter condition you can add logic based on filenumber port to filter the records you need.
Is your issue solved or do you need additional information.