Feature Request: Add batch processing capability for directory conversion
Author: HossyWorldsCreated Jul 19, 2025Updated Sep 10, 2026
User Story
As a user, I want to convert multiple files in a directory to Markdown format in one operation, so that I can efficiently process large collections of documents without having to run the command for each file individually.
Current Behavior
Currently, MarkItDown only supports converting single files:
markitdown path-to-file.pdf > document.md
Desired Behavior
I would like to be able to specify a directory and have MarkItDown process all supported files within that directory (and subdirectories):
# Process all files in a directory
markitdown --batch ./documents --output ./converted
# Process with specific file types
markitdown --batch ./documents --output ./converted --types pdf,docx,pptx
# Process with recursive subdirectory support
markitdown --batch ./documents --output ./converted --recursive
Use Cases
- Document Collections: Converting entire folders of PDFs, Word documents, and PowerPoint presentations
- Data Processing Pipelines: Batch processing for LLM training data preparation
- Documentation Migration: Converting legacy document collections to Markdown format
- Research Projects: Processing large datasets of various document types
Proposed Implementation
- Add
--batchor-bflag to specify directory processing mode - Add
--outputor-oflag to specify output directory - Add
--recursiveor-rflag for subdirectory processing - Add
--typesflag to filter by specific file extensions - Maintain directory structure in output
- Provide progress reporting and error handling
Benefits
- Efficiency: Reduce manual work for large document collections
- Consistency: Ensure all files are processed with the same settings
- Scalability: Handle large document repositories
- Integration: Better integration with automated workflows
Alternative Solutions
Currently, users need to create custom scripts or use shell commands like:
find ./documents -name "*.pdf" -exec markitdown {} -o {}.md \;
This works but lacks the native integration and error handling that a built-in feature would provide.
Priority
Medium - This would significantly improve the user experience for users working with document collections.
Labels
enhancementfeature-requestclibatch-processing
Source: microsoft/markitdown