Function to filter by filename.