I have some assumptions about this - mainly that you're trying to loop on files from your knowledge base, in which case I feel like you should be using a search folder node to find the all the files in your "unprocessed folder" then move them into a processed folder so you don't work on them again
But, if you're watching for new files, I don't think you need a loop because each one would trigger individually.
So, I think I need to understand more about your intent to suggest a better approach.