Wild Card at end of variable - parameter

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?)

You should be able to do something like this:

_parameter1 + “*.json”

Making sure to check the expression evaluation toggle.

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

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?

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

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

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

Filter out the files I don’t want.

Then the delete.

1 Like

Seems like an enhancement request for wildcarding in the delete snap may be in order! :slight_smile: Glad you got something working, though.