The answer depends on the results you want. To just find out that a file is missing then count the files you have and alert if that number is less than what is expected.
index=foo | stats dc(source) as fileCount | where fileCount < 50
If, OTOH, you need to know which file is missing then you have more work to do. Finding something that is not there is not Splunk's strong suit. See this blog entry for a good write-up on it.