Deleting one or more files

Kettle provides two job entries for deleting files: Delete file and Delete files. You can find both in the File management category of entries.

In this recipe, you will see an example of how to delete a file. You will delete a file that includes the current date as part of its name, for example test_20101020.txt.

Getting ready

You must create a sample file; for example, test_20101020.txt. Make sure to use your current date instead of 20101020. Use the same format (yyyyMMdd).

How to do it...

Perform the following steps to learn how to delete one or more files:

  1. Create a new transformation.
  2. Drop a Get System Info step from the Input category into the work area.
  3. Double-click on the step and add a field named date. In the Type column, ...

Get Pentaho Data Integration Cookbook Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.