Other thing you could try is to add a Gate snap after the filter on your current design. The gate snap will continue even if you don’t have anything on input.
\nBe careful though, if your files volume increases over time the gate snap can be dangerous since it puts everything that it’s received on input into an array.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":2,"repliesCount":0,"postTime":"2022-12-15T08:43:36.907-08:00","lastPublishTime":"2022-12-15T08:43:36.907-08:00","metrics":{"__typename":"MessageMetrics","views":5612},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"User:user:1302":{"__typename":"User","id":"user:1302","uid":1302,"login":"tarena","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2020-03-06T11:18:05.623-08:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":"https://community.snaplogic.com/t5/s/iaudz84835/m_assets/avatars/default/avatar-9.svg?time=0"},"rank":{"__ref":"Rank:rank:18"},"entityType":"USER","eventPath":"community:iaudz84835/user:1302"},"ModerationData:moderation_data:11405":{"__typename":"ModerationData","id":"moderation_data:11405","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:11405":{"__typename":"ForumReplyMessage","uid":11405,"id":"message:11405","entityType":"FORUM_REPLY","eventPath":"category:platform/category:products/community:iaudz84835board:pipelines/message:11403/message:11405","revisionNum":1,"author":{"__ref":"User:user:1302"},"readOnly":false,"repliesCount":1,"depth":1,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:pipelines"},"parent":{"__ref":"ForumTopicMessage:message:11403"},"conversation":{"__ref":"Conversation:conversation:11403"},"subject":"Re: How to filter files from directory","moderationData":{"__ref":"ModerationData:moderation_data:11405"},"body":"You can use the filter function of the Directory Browser snap to only look for specific file names. In your case of matching test1.csv and test2.csv, but not matching test3.csv or any other value, you could use the filter expression :
\ntest[1-2].csv
\nThis will search the directory for all files with the value of test1.csv and test2.csv, but no other values. If there are multiple files with the test1.csv/test2.csv name, then all those files will be returned.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":2,"postTime":"2022-12-15T10:59:42.870-08:00","lastPublishTime":"2022-12-15T10:59:42.870-08:00","metrics":{"__typename":"MessageMetrics","views":5606},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuNHwyLjF8b3wzfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:11406"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:11406":{"__typename":"ModerationData","id":"moderation_data:11406","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:11406":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:2520"},"id":"message:11406","entityType":"FORUM_REPLY","eventPath":"category:platform/category:products/community:iaudz84835board:pipelines/message:11403/message:11406","revisionNum":1,"uid":11406,"depth":2,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:pipelines"},"parent":{"__ref":"ForumReplyMessage:message:11405"},"conversation":{"__ref":"Conversation:conversation:11403"},"subject":"Re: How to filter files from directory","moderationData":{"__ref":"ModerationData:moderation_data:11406"},"body":"That looks promising …looks like ive used names with same name (test) …but how to build expression if one file is “mama mia.csv” and another one is “snaplogic.csv”?
\nis there a chance to use regex? to solve it with something like this?
\n‘^mamma mia.csv$|^snaplogic.csv$
’
@SL12345 You can try below option -
\nThe 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’:
\n{mamma mia.csv, snaplogic.csv}
\nCheck the SnapLogic documentation here for the Directory Browser file filter -here-.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"postTime":"2022-12-15T15:13:34.262-08:00","lastPublishTime":"2022-12-15T15:13:34.262-08:00","solution":true,"metrics":{"__typename":"MessageMetrics","views":7034},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuNHwyLjF8b3wzfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:11409"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"203","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:11409":{"__typename":"ModerationData","id":"moderation_data:11409","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:11409":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:2520"},"id":"message:11409","entityType":"FORUM_REPLY","eventPath":"category:platform/category:products/community:iaudz84835board:pipelines/message:11403/message:11409","revisionNum":1,"uid":11409,"depth":2,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:pipelines"},"parent":{"__ref":"AcceptedSolutionMessage:message:11407"},"conversation":{"__ref":"Conversation:conversation:11403"},"subject":"Re: How to filter files from directory","moderationData":{"__ref":"ModerationData:moderation_data:11409"},"body":"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
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"127","kudosSumWeight":0,"repliesCount":0,"postTime":"2022-12-19T01:44:05.485-08:00","lastPublishTime":"2022-12-19T01:44:05.485-08:00","metrics":{"__typename":"MessageMetrics","views":1411},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"QueryVariables:MessageSolutions":{"__typename":"QueryVariables","id":"MessageSolutions","value":{"first":10,"constraints":{"topicId":{"eq":"message:11403"},"solution":{"eq":true}},"sorts":{"postTime":{"direction":"ASC"}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":false,"useBody":true,"useKudosCount":false,"useTimeToRead":false,"useMedia":true,"useRepliesCount":false,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":true,"useTags":false,"useUserHoverCard":false,"useNodeHoverCard":false,"usePreviewSubjectModal":false,"useMessageStatus":false}},"CachedAsset:text:en_US-components/community/NavbarDropdownToggle-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/community/NavbarDropdownToggle-1750955846246","value":{"ariaLabelClosed":"Press the down arrow to open the menu"},"localOverride":false},"CachedAsset:text:en_US-components/messages/EscalatedMessageBanner-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/EscalatedMessageBanner-1750955846246","value":{"escalationMessage":"Escalated to Salesforce by {username} on {date}","viewDetails":"View Details","modalTitle":"Case Details","escalatedBy":"Escalated by: ","escalatedOn":"Escalated on: ","caseNumber":"Case Number: ","status":"Status: ","lastUpdateDate":"Last Update: ","automaticEscalation":"automatic escalation","anonymous":"Anonymous"},"localOverride":false},"CachedAsset:text:en_US-components/users/UserLink-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/users/UserLink-1750955846246","value":{"authorName":"View Profile: {author}","anonymous":"Anonymous"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/users/UserRank-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserRank-1750955846246","value":{"rankName":"{rankName}","userRank":"Author rank {rankName}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageTime-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageTime-1750955846246","value":{"postTime":"Published: {time}","lastPublishTime":"Last Update: {time}","conversation.lastPostingActivityTime":"Last posting activity time: {time}","conversation.lastPostTime":"Last post time: {time}","moderationData.rejectTime":"Rejected time: {time}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSolvedBadge-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSolvedBadge-1750955846246","value":{"solved":"Solved"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSubject-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSubject-1750955846246","value":{"noSubject":"(no subject)"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageBody-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageBody-1750955846246","value":{"showMessageBody":"Show More","mentionsErrorTitle":"{mentionsType, select, board {Board} user {User} message {Message} other {}} No Longer Available","mentionsErrorMessage":"The {mentionsType} you are trying to view has been removed from the community.","videoProcessing":"Video is being processed. Please try again in a few minutes.","bannerTitle":"Video provider requires cookies to play the video. Accept to continue or {url} it directly on the provider's site.","buttonTitle":"Accept","urlText":"watch"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageCustomFields-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageCustomFields-1750955846246","value":{"CustomField.default.label":"Value of {name}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageReplyButton-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageReplyButton-1750955846246","value":{"repliesCount":"{count}","title":"Reply","title@board:BLOG@message:root":"Comment","title@board:TKB@message:root":"Comment","title@board:IDEA@message:root":"Comment","title@board:OCCASION@message:root":"Comment"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSolutionList-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSolutionList-1750955846246","value":{"emptyDescription":"No has been message solutions yet"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageListMenu-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageListMenu-1750955846246","value":{"postTimeAsc":"Oldest","postTimeDesc":"Newest","kudosSumWeightAsc":"Least Liked","kudosSumWeightDesc":"Most Liked","sortTitle":"Sort By","sortedBy.item":" { itemName, select, postTimeAsc {Oldest} postTimeDesc {Newest} kudosSumWeightAsc {Least Liked} kudosSumWeightDesc {Most Liked} other {}}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1750955846246","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/common/Pager/PagerLoadMore-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/common/Pager/PagerLoadMore-1750955846246","value":{"loadMore":"Show More"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageView/MessageViewInline-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageView/MessageViewInline-1750955846246","value":{"bylineAuthor":"{bylineAuthor}","bylineBoard":"{bylineBoard}","anonymous":"Anonymous","place":"Place {bylineBoard}","gotoParent":"Go to parent {name}"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1750955846246","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1750955846246","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/common/ExternalLinkWarningModal-1750955846246":{"__typename":"CachedAsset","id":"text:en_US-components/common/ExternalLinkWarningModal-1750955846246","value":{"title":"Leaving the Community","description":"You're about to leave this site and navigate to an external domain. Are you sure you want to continue?","action.submit":"Continue","action.cancel":"Go Back"},"localOverride":false}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"pipelines","messageSubject":"how-to-filter-files-from-directory","messageId":"11403"},"buildId":"8CqYPsxb5UG4aoIp8lqTz","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","surveysEnabled":true,"openTelemetry":{"clientEnabled":false,"configName":"snaplogic","serviceVersion":"25.4.0","universe":"prod","collector":"http://localhost:4318","logLevel":"error","routeChangeAllowedTime":"5000","headers":"","enableDiagnostic":"false","maxAttributeValueLength":"4095"},"apolloDevToolsEnabled":false,"quiltLazyLoadThreshold":"3"},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["components_seo_QAPageSchema","components_community_Navbar_NavbarWidget","components_community_Breadcrumb_BreadcrumbWidget","components_messages_TopicWithThreadedReplyListWidget","components_messages_MessageListForNodeByRecentActivityWidget","components_customComponent_CustomComponent","components_community_FooterWidget","components_messages_MessageView_MessageViewStandard","components_messages_ThreadedReplyList","components_external_components_ExternalComponent","components_community_FooterWidgetHelpLink","components_community_KhorosLogo","components_messages_EscalatedMessageBanner","shared_client_components_common_List_UnstyledList","components_messages_MessageView","shared_client_components_common_Pager_PagerLoadMore","shared_client_components_common_List_ListGroup","components_messages_MessageView_MessageViewInline","components_customComponent_CustomComponentContent_TemplateContent"],"appGip":true,"scriptLoader":[]}