How to batch-convert a folder of documents with an AI agent
How to batch-convert a folder of documents with an AI agent
Leave feedback
On this page
Convert an entire folder of documents with a single prompt — the agent orchestrates, the GroupDocs engine batch-converts locally; nothing is uploaded and your originals are kept. Point the server at the folder and ask:
Convert every DOCX in my documents folder to PDF, keep the originals
The agent enumerates the files, calls convert per document, and reports what it produced. No uploads, no per-file clicking, no script to maintain.
The key setting: the storage folder
Batch scenarios live or die on the folder mapping. Set it once and the whole folder is in scope for every prompt:
With a separate GROUPDOCS_MCP_OUTPUT_PATH, originals stay untouched in storage and every converted file lands in the output folder — the cleanest batch layout. (Installer users: this is storagePath / outputPath in one config.)
Prompts that scale
“Convert everything in this folder from DOCX to PDF.”
“Turn all the PDFs into Markdown; skip files that are already converted.”
“Convert the invoices to PDF/A for archiving, and list any file that failed.”
“Make PNG previews of every presentation.”
The prompt is the orchestration layer: filtering (“only the 2025 ones”), sequencing (“check page counts first”), and error policy (“list failures at the end”) are all plain language — the deterministic conversion stays in the engine.
Practical notes
Existing files are never overwritten — re-running a batch produces distinctly-named files rather than clobbering earlier output.
Large batches: agents typically process files sequentially; a few hundred documents work fine, and the report at the end tells you exactly what happened. For scheduled/unattended pipelines beyond agent sessions, the same engine is scriptable via the .NET library.
Evaluation mode caps a single server process at 15 opened documents — a license lifts this for real batches.
FAQ
Can Claude convert an entire folder at once?
Yes — one prompt; the agent iterates the folder through the local MCP server. You never upload files one by one.
How do I keep originals?
They are kept by default — conversion writes new files. A separate output folder (above) keeps the source folder pristine.
Can I filter which files get converted?
Say it in the prompt — by extension, name pattern, or even content questions the agent checks via get_document_info.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.