3 Replies Latest reply on May 12, 2017 1:52 PM by try67

    Delete files from folder in Action step


      Hello. I’m creating an action for my users that starts by Step 1, converting a multi-page PDF to separate TIFF files that are saved into a folder, then Step 2, combines those files back to a new PDF, then Step 3, OCRs the new PDF for editing. The reason for this process is that the original PDF contains renderable text and so can't be OCRd.


      In order to combine the separate TIFFs into the new PDF in Step 2, the user needs to select the correct just-created TIFF files for the current PDF from the folder. Each time they perform the Action on another document, more TIFFs are automatically placed in the same folder. There is concern that the wrong files will be chosen to combine into the current PDF.


      I would like to add a step to the action that deletes any files from the TIFF folder before the next ones are added, so that the current TIFFs will be the only files in the folder when the user goes in to select the files for their current PDF. I think it could be the first step in the Action.


      But I can't come up with a process that automatically deletes the files from a specific folder location on the local machine. Have looked thru the standard Action settings, tried a couple of javascript tests, and spent done around 3 hours of searching online.


      Second best would be a step that auto sorts the folder so that the newest files are at the top.


      Does anyone have any ideas please?


      Thank you.