• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Delete files from folder in Action step

New Here ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

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.

TOPICS
Edit and convert PDFs

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 12, 2017 May 12, 2017

No, JS can't do it, either.

Votes

Translate

Translate
Community Expert ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

An Acrobat Action can't delete files.

I don't understand what you mean about the sorting, but you can't tell an Action to process files in a certain order, unless you manually add them to it in that order. If you select a whole folder you can't control the way it's processed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

Thank you for your response, try67.

It's not that I want the action to process files in a certain order. It's that I want it to go out and delete files on the local drive, or maybe delete the files when it combines them back into the PDF. Something like that.

Please ignore my 'second best' of sorting. That's unnecessary.

I fear that the first sentence of your answer is going to be the correct response.

Would some javascript do the job?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

LATEST

No, JS can't do it, either.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines