I want to capture all the files in a particular folder but I do not want to capture the files inside the sub-directories of that folder.
So... I would do something like this
[monitor://C:\path\*(log$|txt$|csv$)]
disabled = 0
recurse = false
followTail = 0
sourcetype=YOURSOURCETYPENAME
ignoreOlderThan = 7d
index = YOURINDEX
Or specify file names. These should no recurse down the sub folders since you are specifying exact file names, or partial file names with wildcards. Filename_9-20-18.log would be written like Filename_.log$*. The $ tells it to not pickup files like Filename_DATE.log.gz
[monitor://C:\path\sourcetypeA*.file_extension$]
disabled = 0
followTail = 0
sourcetype=sourcetypeA
ignoreOlderThan = 7d
index = YOURINDEX
[monitor://C:\path\sourcetypeB*.file_extension$]
disabled = 0
followTail = 0
sourcetype=sourcetypeB
ignoreOlderThan = 7d
index = YOURINDEX
Linux paths look a little different, but the rest is about the same.
[monitor:///opt/apache-tomcat/*/logs/catalina.out]
Will grab catalina.out from /opt/apache-tomcat/8.1/logs AND /opt/apache-tomcat/8.2/logs