# How to batch-convert a folder of documents with an AI agent Convert an entire folder of documents with a single prompt — the agent orchestrates, the GroupDocs engine batch-converts locally; nothing is uploaded, originals are kept. 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`]({{< ref "conversion/mcp/tools-reference/convert.md" >}}) per document, and reports what it produced. No uploads, no per-file clicking, no script to maintain. {{< alert style="info" >}} The commands and config snippets on this page are for the **.NET** build of the server — the only platform available today. Installation and client setup: [MCP server for .NET]({{< ref "conversion/net/mcp/_index.md" >}}). Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged. {{< /alert >}} ## 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: ```json { "mcpServers": { "groupdocs-conversion": { "type": "stdio", "command": "dnx", "args": ["GroupDocs.Conversion.Mcp", "--yes"], "env": { "GROUPDOCS_MCP_STORAGE_PATH": "/path/to/invoices", "GROUPDOCS_MCP_OUTPUT_PATH": "/path/to/invoices/converted" } } } } ``` 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]({{< ref "conversion/net/mcp/configuration.md" >}}).) ## 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]({{< ref "conversion/net/_index.md" >}}). * **Evaluation mode** caps a single server process at 15 opened documents — a [license]({{< ref "conversion/mcp/getting-started/licensing.md" >}}) lifts this for real batches. * **Failures are reported per file.** When a file cannot be converted — an unsupported source format or a wrong password — the response for that file starts with the operation and the reason, and [`convert`]({{< ref "conversion/mcp/tools-reference/convert.md" >}}) accepts an optional `password`. Put "list any file that failed" in the prompt so a failure does not pass unnoticed. ## 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`]({{< ref "conversion/mcp/tools-reference/get-document-info.md" >}}). ## Read more * [A whole folder, one prompt: batch conversion with Claude and MCP](https://blog.groupdocs.com/conversion/batch-convert-folder-ai-agent-mcp/) — the same scenario on the GroupDocs blog, with worked examples and the trade-offs.