How to Automatically Process Selected PDFs Using Acrobat Action Wizard
Question details
The user needs an Acrobat Action Wizard workflow to automatically identify and process only specific PDF files in a folder based on file names or document text, without manual file selection.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Running a batch process on a folder of PDFs where only a subset of documents meets the criteria for modification.
- Observed behavior
- Standard Action Wizard commands process all files in a folder and do not offer built-in conditional filtering to isolate specific files automatically.
Ensure you have a basic understanding of JavaScript for Adobe Acrobat, as you will need to write custom scripts to replace standard Action Wizard commands.
Use JavaScript for Conditional File Processing
Write custom JavaScript within your Action Wizard workflow to evaluate each file's properties or content before applying modifications.
Since the standard Acrobat Action Wizard processes all files in a targeted folder by default, conditional filtering requires a fully script-based approach.
To achieve this, do not use standard Action Wizard processing commands. Instead, rely entirely on a JavaScript step that inspects the document (e.g., checking the file name or reading the text) and executes the necessary API methods only if the conditions are met.
Launch Adobe Acrobat, navigate to the 'Tools' menu, and select the 'Action Wizard' tool.
Click 'New Action' in the top toolbar to begin configuring your automated workflow.
In the 'Choose tools to add' panel on the left, expand the 'More Tools' category. Select 'Execute JavaScript' and click the '+' button to add it to your action steps.
Uncheck the 'Prompt user' checkbox next to the JavaScript step. Click 'Specify Settings' and input your custom script to evaluate properties like 'document.documentFileName' and perform the necessary PDF modifications.
Save the action with a recognizable name. Select the target folder containing all PDFs, run the action, and let the JavaScript filter and process only the matching documents.

Process Multiple PDFs Efficiently with WPS Office
If writing custom JavaScript for conditional filtering is too complex, WPS PDF provides a highly intuitive batch processing interface. You can quickly select specific files manually and apply batch conversions, merging, or compression without needing any code.
- 1. Open WPS PDF: Launch WPS Office and open the PDF tab from the main workspace.
- 2. Select a Batch Tool: Navigate to the 'Tools' tab and click on 'Batch Process', or choose specific tools like 'PDF to Word' or 'Merge PDF'.
- 3. Add Selected Files: Click 'Add Files' to open your local folder. Use standard keyboard shortcuts (Ctrl or Shift) to select only the specific PDFs you want to process.
- 4. Start Processing: Configure your preferred output settings and click 'Start' to process all the selected documents simultaneously.

Frequently Asked Questions
Can standard Action Wizard commands filter files without scripting?
No, standard Action Wizard commands automatically apply to all files in the selected folder. Conditional processing based on file names or content strictly requires custom JavaScript.
How do I check a PDF's file name using JavaScript in Acrobat?
You can access the file name using the 'documentFileName' property within your Acrobat JavaScript code. Your script can then use string matching functions to determine if the file should be processed.
Why did my action modify files that didn't match my JavaScript criteria?
This happens if you combined standard processing commands with your JavaScript step in the Action Wizard. Standard commands ignore JavaScript logic and apply to all files. To fix this, script all your modifications directly inside the JavaScript step.
Can I read the text content of a PDF to trigger an action?
Yes. Using Acrobat JavaScript, you can utilize methods like 'getPageNumWords()' and 'getPageNthWord()' to loop through document text and apply processing changes only if specific text strings are found.




