12-15-2022 08:09 AM
Hi Snaplogic experts,
iam struggling with one task - get two files from source directory and process them (everything works fine if both files are there or one of the files is in directory)
My problem is - if both files are not presented, send an email - everything works fine if there are only two files in source directory (directory browser returns me 0 documents) - snaplogic will send an email that files are not there.problem is, if in source directory are another files, or folders - directory browser never retrieve 0 documents (logically).
So i used filter snap - but if there is no output from filter, pipeline ends and send nothing.
My question is: how to check source directory if files test1.csv and test2.csv are there (there are more files - test3.csv inovice.pdf etc) and if files are not there send an email ?
thank you
Solved! Go to Solution.
12-15-2022 03:13 PM
The Directory Browser uses GLOB, not Regex, but you can do similar searches. Multiple patterns can be used. They must be contained in brackets. For example the following will return ‘mamma mia.csv’ and ‘snaplogic.csv’:
{mamma mia.csv, snaplogic.csv}
Check the SnapLogic documentation here for the Directory Browser file filter -here-.
12-19-2022 01:44 AM
i dont know why but {mamma mia.csv} didnt work, i had to use {mamma%20mia.csv} in order to encode (empty) space between words
12-16-2022 07:32 AM
@SL12345 You can try below option -