Skip to main content Skip to footer

Files Delete Documentation

Version: 1.0.1 

Retrieved: 2025-10-09 15:15:52


File(s) Deletion

Will delete 0-n files based on a path and pattern.

This module is designed to be located in the middle of a flow.

Settings

Name Requirements Purpose Default
Static File Pattern String with length 0-64 If set this pattern will be used all the time.  
File Pattern Property String with length 0-64 The pattern is expected to be on the incoming message inside the File Pattern Property  
Include Subfolders Boolean If true the module will delete matching files in subfolders as well. false

Input

If the Static File Pattern is not set the module require the File Pattern Property to be included on the incoming message.

Output

The same as input

Example 1

Usage with Static File Pattern and wildcard in file name. We will delete all .txt files in the folder named myFolder.

Settings

Static File Pattern = './myFolder/*.txt'
Include Subfolders = false

Input

{
  example:{
    data:{
      temp: 342,
      rpm: 4500
    }
  }
}

Output

{
  example:{
    data:{
      temp: 342,
      rpm: 4500
    }
  },
  crosser : {
    success: true
  }
}

Example 2

Usage with dynamic File Pattern Property and Include Subfolders set to true.

This will delete all .log files (including all subfolders from the current location).

Settings

Static File Pattern = ''
File Pattern Property = 'example.pattern'
Include Subfolders = true

Input

{
  example:{
    pattern: './*.log',
    data:{
      temp: 342,
      rpm: 4500
    }
  }
}

Output

{
  example:{
    pattern: './*.log',
    data:{
      temp: 342,
      rpm: 4500
    }
  },
  crosser : {
    success: true
  }
}

Note

If one or more files fails to be deleted the crosser object will have the property success set to false and a message property will provide an explanation about the error.

If no files were found to delete that will not cause an error.