Esko Logo Back to Esko Support
Choose your language for a machine translation:



How can you select all files in a folder, except for files with a specific file name?

For example: To build a workflow which selects and deletes all the files which name does not start with abc.


There is no option in the Select Files task to select all files except for specific files. So, you need to make your selection in two steps:

  • The below example workflow will first select all the files in the sub folder MyFolder inside the Job folder.
  • Then use the router to select the files which you want to keep. And specify an output name for the No Match output. In this case, To be removed.
  • You can add additional "Match" items if you need to match more than one string of characters. Add them above the No Match item. The Router considers the list from top to bottom and sends each file to the first match.
  • You can also use other options in the Route based on field to use other parameters than the file name to make the selection.
  • From Automation Engine 12.2.0 onwards, If you want to use several different Route based on properties, you can create a Conditional SmartName with the different properties, and then set the Router to resolve based on SmartName Values.


Article information
Applies to

Automation Engine 12.2.0

Last revised 
CW Number223572