The action Merge Files

Modified on Fri, 12 Sep at 5:14 PM

Purpose  

Combine multiple input files into a single output file. When the inputs are PDF files the action produces one merged PDF; when the inputs are .txt files the action produces one merged text file. Use it to create daily/weekly bundles, aggregate processed records, or assemble batches for printing, emailing or transfer.


Where to add  

Add Merge Files into the scenario of the folder account. Typical use patterns:

  • Collect many incoming PDFs and merge them into one daily PDF.
  • Aggregate extracted .txt files into one combined log, report file, or content summarization.
  • Run the extra scenario that runs after all individual files have been processed, you can add in this extra scenario the print action or send by email...


Main settings

  • Destination folder: Specify the folder where the merged file will be saved (local path or UNC network path). Use Search to browse. When running as a service prefer UNC paths for network shares. (You can include fields like in the filename)
  • Filename: Enter the output filename. Include fixed text and/or Fields to make the name dynamic and unique (examples: %DATE_YEAR%-%DATE_MONTH%-%DATE_DAY%.pdf or Batch.txt). The action will set the extension automatically based on input type but including it explicitly is good practice.
    • Use Fields to insert filename/date/time/metadata tokens into the Filename or folder. Tokens are replaced at runtime.


Action to merge files into single PDF


More options

  • Passwords to open the original file
    If the incoming file is password-protected, enter one password per line for each file type to allow the converter to open it:
    - For a Word file: enter possible passwords (one per line).
    - For an Excel file: enter possible passwords (one per line).
    - For a PowerPoint file: enter possible passwords (one per line).
    Rofiles will try these passwords when opening protected documents so conversion can proceed.


Supported file types

  • PDF: produces a merged .pdf.
  • TXT (plain text): produces a merged .txt.
  • Mixed types in one run are not supported, you can use the action to convert to pdf or text before the action 'Merge to'.


How it works, the quick steps

  1. Configure Destination folder and Filename (use Fields if you want dynamic names).  
  2. Ensure the scenario supplies multiple input files of the same type to this action.  
  3. Run the scenario. The action reads each input and appends it to the output in the incoming order.  
  4. Use subsequent actions (Print, Send Email, Send File to FTP, Save File, etc.) to distribute or archive the merged file.


Behavior notes and tips

  • Order matters: merge order follows processing order, by default it is alphabetical ordering, pre-sort filenames or use an upstream action to order files accordingly.  
  • File locking: ensure input files are fully written and unlocked before merging. If files are produced by another process, add a short Pause or a retry loop, or implement a marker-based trigger to ensure readiness.  
  • Large batches: merging many or very large PDFs may consume memory and time. For very large jobs split into smaller batches or run during off-peak hours.  
  • Permissions: the process account must have write access to the Destination folder (NTFS and share permissions for network locations).  
  • Running as a service: use UNC paths for network destinations and ensure the service account can access the target folder.


Examples

  • Daily invoice bundle (PDFs) and print:
    - Destination folder: \\fileserver\bundles\
    - Filename: Invoices_%DATE_YEAR%-%DATE_MONTH%-%DATE_DAY%.pdf
    - After merge, in the extra scenario: Add actions to Print the file and Send Email to accounting with the merged PDF attached.
  • Consolidate text logs:
    - Destination folder: C:\logs\archive\
    - Filename: logs-%DATE_YEAR%-%DATE_MONTH%-%DATE_DAY%.txt
    - After merge, in the extra scenario:  Upload via Send File to FTP.


Troubleshooting

  • Output missing or empty: confirm inputs reached the action and were not filtered out; check processing logs for errors.  
  • “Access denied” or cannot write output: verify folder path and user/service account permissions; prefer UNC paths for services.  
  • Mixed file types error: ensure only PDF or only TXT files are sent to this Merge action.


Best practices

  • Use tokens in the filename to avoid collisions and for easier organization.  
  • Validate the set of files to be merged (type and readiness) before invoking the Merge action.  
  • For high-volume or very large merges, batch the work (e.g., hourly or daily merges) and run during low-load times.  
  • After merging, use extra scenario actions (Add watermark on PDF, Print, Send Email, Send File to FTP, ...) to distribute and record the result.


That’s it, set the destination folder and filename (with optional Fields), ensure a set of same-type files is delivered to the action, and Merge File will produce a single combined PDF or TXT you can then print, email or upload as part of your automated workflow.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article