How can I loop through to delete all files in a directory?

I am trying to delete all files in a directory, and selecting them with the Directory Lister module, but I end up only deleting one file. What is happening?


  • In your screenshot above, since you have a Table Cell Selector (and specifying the 1st Row with Row 0), it is only selecting that row and sending that file to the delete module. So you are only deleting a single file.

    You actually need to loop through all entries of the results. To do that, you need a Table ForEach Module (essentially a for loop across all entries in the table). After the Table ForEach, it returns a “full row” from the table on each iteration, so you need a TableRow Cell Selector module. The part of the DataFlow should look as follows:

Sign In or Register to comment.