avoid parsing the same file in the directory

If I have 100 files in my directory and I want to parse every file with “while”, is there any solution to avoid the parsing of the same file, if they are not deleted?

while true do     ls  | grep -rnw "string" /path | awk -F',' '{print $  1,$  2}' | sed 's/_/ /g;s/\./ /g' | awk '{print $  6,$  9}'      sleep 3 done