cancel
Showing results for 
Search instead for 
Did you mean: 

Wild Card at end of variable - parameter

jhagist
New Contributor III

I am using a delete file snap and would like to delete all files that start with a name stored in a parameter.

Ex. controlfile1.json // controlfile2.csv

How would I put a wildcard at the end of the parameter?

_parameter1 (what goes here?)

5 REPLIES 5

Schevus
New Contributor III

You should be able to do something like this:

_parameter1 + “*.json”

Making sure to check the expression evaluation toggle.

jhagist
New Contributor III

Thanks for the feedback. I was looking for something more like this. (This doesn’t work)

image

Schevus
New Contributor III

Sorry, looks like you are correct. Perhaps do your filtering in a directory browser, and then grab the filenames from the results to be used in the delete snap?

jhagist
New Contributor III

Thank you… that pointed me in the right direction. What follows works but isn’t real pretty. Would love any suggetions for improvement.

Here is the entire pipeline

image

The Directory Browser is set up like this. (Top one is for the json and bottom is csv)

image

The mapper takes the parameter to select the files i want to delete.

image

Filter out the files I don’t want.

image

Then the delete.

image