Use Rules to Automatically Rename Different Document Types
- Introduction
- Using AutoSplit™ to auto-rename different documents using unique settings for each document type can be time consuming. To avoid repeating the process for each document type, the user can create renaming rules to process multiple file types in the same input. This means that documents with different text layouts and naming requirements can be auto-renamed at once - a specific file naming scheme will be used for each document.
- Rules are configured to search input documents for specific text. This could be any plain text, or text following a pattern - such as account /employee/social security numbers, names or dates etc. If matching text is identified, the corresponding rule will be used to rename the file. If multiple rules match the input document, then all of them will be used to rename the document. This allows creating flexible renaming rules that adapt to differences in the document content.
- In the tutorial below, we will create two separate renaming rules and use them to rename sample business documents. One file naming scheme will be designed to rename invoices, the other to rename purchase orders. Input documents will be searched for the presence of the text "invoice" or "purchase order". If matching text is identified in an input document, the correct rule will be used to rename it.
- Input Document Description
- The sample files used here are a collection of invoices and purchase orders. The original filenames do not feature any content that is related to each document's content. The goal is to rename them so that invoices are named using the invoice number located within them, and purchase orders are renamed using the relevant customer names. This information is located on the first page of each document. Such file names may be more useful when used by an accounting department or being archived for future use.
- The plug-in will identify "INVOICE" or "PURCHASE ORDER" in each document, and use the correct renaming rule to generate an output filename.
- Batch Processing Support
- Automate this operation with Acrobat's batch processing tool (Action Wizard) to process similar files using the same configuration with only one click.
- Prerequisites
- You need a copy of Adobe® Acrobat® along with the AutoSplit Pro™ plug-in installed on your computer in order to use this tutorial. Both are available as trial versions.
- Step 1 - Open the “Auto-Rename PDF Files” Menu
- Start Adobe® Acrobat® and select “Plug-ins > Auto-Rename PDF Files…” from the main Acrobat menu.
- Step 2 - Add a New Renaming Rule
- Press “Add Rule…” to configure a file renaming rule.
- Step 3 - Configure the Text Search
- This renaming rule will be used when matching search text is identified within an input file. Type the text that you want to search for in the "Find what:" entry box. Here, we will search for the word "invoice" to identify invoices.
- Optional: use a search expression by checking "Use regular expressions" to find text following a specific pattern. Regular expression syntax is used to format expressions.
- Check any necessary processing options such as "Match whole words only" or "Match case". In this example, both are left unchecked ("INVOICE" is uppercase in the sample invoices used here, but the expression would still work if the text case was inconsistent across all files being renamed).
- Press "OK" to proceed.
- Step 4 - Add a File Naming Component
- Press "Add..." to begin defining a file renaming scheme.
- Choose a method for adding a filename component. Here, we will demonstrate how to add custom text. Select the "Custom Text..." option and press "Next >>".
- Enter the custom text that you wish to add to filenames when this renaming rule is used, and press "OK". Here, we will insert "Invoice_".
- Step 5 - Insert Text From a Specific Page Location into Filenames
- Press "Add..." to add another file renaming component.
- Select the "Text From Location" option and press "Next >>".
- You will be prompted to select a sample file to define the area text should be extracted from. Press "OK" to proceed.
- Locate and select a suitable file to use, and press "Open".
- Use the zoom tool to expand a page area. Then use the drawing tool to draw a box around the desired text area by clicking and dragging the cursor.
- Press "OK" to proceed.
- Step 6 - Add a Second Renaming Rule
- The two filenaming components for this rule are now listed. Repeat the procedure to add more and use the additional buttons to add/edit/remove components. The blue arrow buttons can be used to re-order them.
- Press “Add Rule…” to add another renaming rule for the second file type.
- This renaming rule will be used when the words "purchase order" are identified within an input document (see step 3 above).
- Press "OK" to proceed.
- Step 7 - Add Filename Components
- Press "Add..." to configure the filename components to be used.
- We will use the same method as steps 4 & 5 above to rename purchase orders with custom text ("PO_"), followed by text extracted from a specific page location. Here, we will extract customer names located within each purchase order in the output filenames. Select a sample file to define the area text should be extracted from, then use the zoom/drawing tools to draw a box around where names are located.
- Press "OK" to proceed.
- A single renaming rule will be used when either "invoice" or "purchase order" is identified within an input document.
- Step 8 - Optional: Move Renamed Files
- Save renamed files in a separate location (instead of replacing existing filenames) by checking the "Move successfully renamed files to another folder" option. This activates the "Select Output Folder..." button - press it to specify an output folder for the renamed files.
- Locate the desired folder, select it, and press "Select Folder".
- Step 9 - Confirm/Save Renaming Options
- Optionally use the "Save Settings..." button to save this configuration as a *.docren settings file for future re-use. This can be loaded via the "Load Settings..." button.
- Click "OK" to use these settings to rename files.
- Step 10 - Add Files for Renaming
- Press “Add Files…” in the “Select Input Files” dialog to select files that need to be renamed. Consider also making backup copies of the input files before processing.
- Select PDF files that need to be renamed and click "Open" once done. Note that files from multiple folders can be added with repeated use of the "Add Files..." button.
- Selected PDF files will be listed in the "Select Input Files" dialog. Press "OK" once all necessary files have been selected.
- Step 11 - Review and Confirm New Filenames
- The software will process input files without renaming them yet, and present "computed" file names in the "Review and Confirm New Filenames" dialog.
The documents have been searched for text matching the search rules, and the appropriate one has been used to create a new filename for each document type.
Note that no files have actually been renamed at this step.
- Review the generated file names and edit them manually by double-clicking on an output filename cell.
- Press “Rename” to confirm the renaming process.
- Step 12 - Review the Processing Report
- Check the renaming statistics. Click “OK” to open a processing report.
- The processing report shows detailed information on how many files have been renamed or failed, along with input/output filenames for each document.
- Optionally save this report by pressing the "Save..." button. Click "Close" to close it.
- Inspect the new filenames (in the output folder, if using) to check that they have been renamed correctly. Invoices and purchase orders now follow an "Invoice_0123456789" or "PO_John Doe" format:
- You can find more AutoSplit tutorials here.