ConvertFiles
13 min read

Batch File Conversion: How to Convert Hundreds of Files at Once

Converting one file is easy. Converting hundreds is a different challenge. This guide walks through every practical way to batch convert files at scale, from drag-and-drop online tools to FFmpeg loops, ImageMagick scripts, LibreOffice headless mode, PowerShell, Python, and cloud automation. Learn which method fits your workflow, how to preserve folder structure, and how to avoid the most common batch conversion mistakes.

Table of Contents

Converting a single file is a solved problem. You drag it into an online converter, click a button, and download the result. But what happens when you need to convert 200 vacation photos, an entire podcast archive, a folder of legal documents your firm has accumulated over a decade, or every video your team shot at last year's conference?

Doing that one file at a time is not just tedious. It is a waste of hours that compound across a team. This guide covers every practical method for batch file conversion, from no-code online tools to command-line power tools and cloud automation pipelines. Whether you are a designer processing client images, a paralegal digitising records, a podcast producer normalising audio, or an IT admin migrating a document library, there is a batch workflow here that will fit.

If you are newer to the subject, it helps to understand how online file conversion works before choosing a batch strategy, because the underlying decoding and re-encoding steps are identical whether you process one file or ten thousand.

When You Actually Need Batch Conversion

Before reaching for scripts, confirm that batch conversion is the right tool. It usually is when you face one of these situations:

  • A recurring workflow that runs weekly or monthly on a fresh set of files
  • A one-time migration (changing archive formats, modernising image libraries)
  • A pipeline where output of one step feeds another (convert, then upload, then tag)
  • File counts that make a graphical interface impractical (anything over roughly 20 files)
  • Strict naming, folder, or metadata rules that humans will inevitably break

If you are converting five files once, a web tool is faster than writing a script. If you are converting 500 files or expect to do it again next quarter, investing 30 minutes in a batch workflow pays for itself immediately.

Online vs Local vs Cloud Workflows

There are three fundamentally different places where batch conversion can happen:

Online batch tools run in a web browser and push files to a remote server for processing. They require no installation, handle almost any format, and are ideal for non-technical users and one-off jobs up to a few hundred files.

Local tools run on your own computer. FFmpeg, ImageMagick, LibreOffice, and scripting languages fall here. They are the fastest, the most private, and the most flexible, but they require command-line comfort.

Cloud automation combines storage buckets, serverless functions, or no-code platforms (Zapier, Make, Google Apps Script) to convert files automatically as part of a larger workflow. This is the right choice when batch conversion needs to happen without a human pressing a button.

The comparison below summarises the realistic trade-offs.

MethodBest forLearning curveSpeedCostFile types
Online batch uploadNon-technical users, mixed file types, one-off jobsVery lowLimited by upload bandwidthFree to lowVery broad
FFmpeg scriptsAudio and video at any scaleMediumVery high (local CPU/GPU)FreeAudio, video, subtitles
ImageMagick / mogrifyImage resizing, format conversion, watermarkingMediumVery highFreeAlmost all raster images
LibreOffice CLI (headless)DOCX, XLSX, PPTX, ODT to PDF and office formatsMediumModerateFreeOffice documents
Desktop apps (XnConvert, Handbrake Queue, Adobe Bridge)Visual workflows, previews, presetsLowModerateFree to paidDepends on app
Cloud automation (Zapier, Make, Apps Script)Recurring jobs, hands-off pipelinesLow to mediumModerate (network bound)SubscriptionDepends on connected services

There is no single winner. Most mature workflows combine two or three of these, using online tools for ad-hoc requests and local or cloud pipelines for recurring jobs.

Method 1: Online Batch Conversion (Drag and Drop)

The simplest batch workflow is to open a web converter, drag a folder of files onto it, and download a ZIP of the results. ConvertFiles supports batch uploads on most conversion types, including DOCX to PDF, PNG to JPG, HEIC to JPG, MKV to MP4, WAV to MP3, and JPG to WebP.

Best practices for online batch jobs:

  • Keep batches under roughly 250 MB total on the free tier, or upgrade for larger limits
  • Name files descriptively before upload; most tools preserve the original stem and only replace the extension
  • For sensitive files, confirm the service's retention policy and review file conversion security practices before uploading
  • When you receive the ZIP, verify a handful of outputs immediately; it is much cheaper to catch a bad setting on file 3 than on file 300

Online batch conversion is the right answer for roughly 80 percent of real-world requests. The rest is where scripting starts to earn its keep.

Method 2: FFmpeg for Audio and Video

FFmpeg is the de facto standard for audio and video processing. A single binary converts between almost every codec and container in common use, and it is trivial to loop over a folder.

On macOS or Linux, convert every MKV in the current directory to MP4:

for f in *.mkv; do
  ffmpeg -i "$f" -c:v libx264 -crf 20 -c:a aac -b:a 192k "${f%.mkv}.mp4"
done

On Windows PowerShell:

Get-ChildItem -Filter *.mkv | ForEach-Object {
  $out = [System.IO.Path]::ChangeExtension($_.Name, '.mp4')
  ffmpeg -i $_.FullName -c:v libx264 -crf 20 -c:a aac -b:a 192k $out
}

Convert a folder of WAVs to MP3 at 256 kbps:

for f in *.wav; do
  ffmpeg -i "$f" -codec:a libmp3lame -b:a 256k "${f%.wav}.mp3"
done

Quality settings matter. CRF 18-23 is the sweet spot for H.264 video, and 192-256 kbps is transparent for most listeners on MP3. Our deep dive on converting WAV to MP3 covers bitrate selection in detail.

Add -threads 0 to let FFmpeg use every available CPU core, or run multiple FFmpeg processes in parallel with GNU parallel for near-linear speedup on large batches.

Method 3: ImageMagick for Images

ImageMagick's mogrify command is purpose-built for batch image work. Unlike convert, which reads one file and writes another, mogrify edits files in place or writes them to a parallel directory.

Convert every PNG in a folder to JPG at 85 percent quality, writing to an output directory:

mkdir -p jpg
mogrify -path jpg -format jpg -quality 85 *.png

Resize every image to a maximum of 1600 pixels on the longest edge:

mogrify -resize 1600x1600\> -quality 85 *.jpg

Strip EXIF metadata (important for privacy when publishing):

mogrify -strip *.jpg

Convert HEIC images from an iPhone to JPG in bulk:

mogrify -path jpg -format jpg -quality 90 *.HEIC

The how to convert HEIC to JPG article walks through HEIC quirks in more depth, including colour profile handling that can bite you in batch jobs.

Method 4: LibreOffice Headless for Documents

LibreOffice includes a command-line mode that converts office documents without opening a window. It is the most reliable free option for batch DOCX, XLSX, PPTX, and ODT conversion, especially when you need to produce PDFs.

Convert every DOCX in a folder to PDF:

soffice --headless --convert-to pdf --outdir ./pdf *.docx

On macOS the binary lives inside the app bundle:

/Applications/LibreOffice.app/Contents/MacOS/soffice \
  --headless --convert-to pdf --outdir ./pdf *.docx

LibreOffice's PDF export preserves fonts, headers, footers, and most layout faithfully, but there are edge cases around complex tables and embedded charts. Our guide to convert Word to PDF formatting tips covers the fonts and layout settings that matter most in batch jobs.

One important caveat: LibreOffice is single-threaded per invocation and will refuse to run two instances against the same user profile. For parallel batches, pass a unique UserInstallation environment variable to each process so they use isolated profiles.

Method 5: PowerShell and Bash Scripts

Shell scripts tie individual tools into reliable pipelines. A well-written script handles errors, preserves folder structure, and logs what it did.

A production-minded Bash script for converting PNGs to JPGs while mirroring the source directory tree:

#!/usr/bin/env bash
set -euo pipefail

src="$1"
dst="$2"
log="batch-$(date +%Y%m%d-%H%M%S).log"

find "$src" -type f -iname '*.png' | while read -r file; do
  rel="${file#$src/}"
  out="$dst/${rel%.png}.jpg"
  mkdir -p "$(dirname "$out")"
  if magick "$file" -quality 85 "$out" 2>> "$log"; then
    echo "OK  $rel" >> "$log"
  else
    echo "ERR $rel" >> "$log"
  fi
done

Both shell scripts and PowerShell scripts share the patterns that make batch jobs survive contact with reality:

  • Mirror the source directory tree instead of flattening it
  • Log every file, both successes and failures
  • Continue on error rather than aborting the whole batch
  • Use the original file name as the stem so results are easy to trace

Method 6: Python with Pillow, pydub, and PyPDF

When a job needs conditional logic, metadata handling, or integration with a database or API, Python is often the cleanest option. The ecosystem covers nearly every format.

Batch convert images with Pillow, resizing and saving as WebP:

from pathlib import Path
from PIL import Image

src = Path("input")
dst = Path("output")
dst.mkdir(parents=True, exist_ok=True)

for path in src.rglob("*.jpg"):
    rel = path.relative_to(src).with_suffix(".webp")
    out = dst / rel
    out.parent.mkdir(parents=True, exist_ok=True)
    with Image.open(path) as img:
        img.thumbnail((2000, 2000))
        img.save(out, "WEBP", quality=82, method=6)

Batch normalise audio levels and convert to MP3 with pydub:

from pathlib import Path
from pydub import AudioSegment, effects

for path in Path("wav").glob("*.wav"):
    audio = AudioSegment.from_wav(path)
    normalised = effects.normalize(audio)
    normalised.export(f"mp3/{path.stem}.mp3", format="mp3", bitrate="256k")

Merge every PDF in a folder into a single document with PyPDF:

from pathlib import Path
from pypdf import PdfWriter

writer = PdfWriter()
for pdf in sorted(Path("pdfs").glob("*.pdf")):
    writer.append(str(pdf))
writer.write("combined.pdf")
writer.close()

Python shines when you need to tag output files from a CSV, skip files that have already been processed, or push results to S3 or a database once conversion finishes.

Method 7: Cloud Automation (Zapier, Make, Google Apps Script)

If you want batch conversion to happen without anyone pressing a button, build a cloud pipeline. Typical triggers include a new file arriving in Google Drive, Dropbox, or an S3 bucket.

A common pattern in Zapier or Make:

  1. Trigger: new file in a watched folder
  2. Filter: only files matching a pattern or above a size threshold
  3. Action: send the file to a conversion API or ConvertFiles endpoint
  4. Action: save the converted file to a destination folder
  5. Action: notify Slack or update a spreadsheet

Google Apps Script is a lightweight alternative for Workspace-heavy teams. A scheduled script can iterate every file in a Drive folder, call the Drive API to export DOCX as PDF, and write the results to a parallel folder:

function convertFolderToPdf() {
  const srcId = 'SOURCE_FOLDER_ID';
  const dstId = 'DEST_FOLDER_ID';
  const files = DriveApp.getFolderById(srcId).getFilesByType(MimeType.MICROSOFT_WORD);
  const dst = DriveApp.getFolderById(dstId);
  while (files.hasNext()) {
    const file = files.next();
    const blob = file.getBlob().getAs('application/pdf');
    dst.createFile(blob).setName(file.getName().replace(/\.docx$/i, '.pdf'));
  }
}

Schedule it with Apps Script's time-driven triggers, and the job runs nightly without anyone logging in.

Handling Errors in Large Batches

The single biggest difference between a toy script and a production batch job is error handling. Expect at least one file in every hundred to be corrupt, password-protected, zero bytes, or in a subtly unsupported variant of the format.

Design your pipeline around these principles:

  • Never abort on one bad file. Log it, skip it, move on.
  • Write a manifest. A CSV of input path, output path, status, and duration makes post-hoc analysis trivial.
  • Keep originals untouched. Always write to a separate output directory until the batch is verified.
  • Use checksums for idempotency. If the script re-runs, skip files whose output already exists and matches.
  • Re-run only failures. A good manifest lets you filter to errored rows and retry just those.

Preserving Folder Structure and Naming

Flattening a deep folder tree into a single output directory is one of the most common batch mistakes. It destroys context that took the team years to build.

Use relative paths from the source root when constructing the output path, as shown in the Bash script above. For naming conventions, pick a rule and stick to it across every batch:

  • Preserve the stem: report.docx becomes report.pdf
  • Suffix with a version or date: report.2025-04-19.pdf
  • Include processing metadata only in a sidecar file, never in the filename

Avoid characters that are problematic on other operating systems (colons, question marks, asterisks) even if your current OS tolerates them. You will regret them the first time the archive moves to Windows.

Quality Settings at Scale

Batch jobs multiply the impact of quality decisions. A 5 percent JPEG quality mistake on one file is invisible; on 10,000 product photos it is a major regression.

Guidelines that hold up in practice:

  • Images: JPEG quality 82-90 for photos, lossless PNG or WebP for graphics, strip metadata unless you need it
  • Audio: 192-256 kbps MP3 for most spoken content and music, FLAC for archival
  • Video: CRF 18-23 for H.264, 22-28 for H.265, match source frame rate exactly
  • Documents: PDF/A for long-term archival, PDF 1.7 for general sharing

Test on a representative sample of 10-20 files before running the full batch. Compare file sizes and visually inspect edge cases (dark photos, quiet audio, documents with unusual fonts).

Scheduling with Cron and Task Scheduler

Recurring batch jobs belong on a scheduler, not in someone's calendar.

A cron entry that converts every new WAV in an inbox folder at 2 AM nightly:

0 2 * * * /usr/local/bin/batch-wav-to-mp3.sh /inbox/wav /outbox/mp3 >> /var/log/batch.log 2>&1

On Windows, Task Scheduler does the same job with a PowerShell script. Whichever you use, send the output to a log file and set up a simple alert (an email on non-zero exit, a Slack webhook, a Healthchecks.io ping) so silent failures do not accumulate for weeks.

Monitoring Progress

For batches that run for hours, progress reporting prevents second-guessing. pv on Linux, Write-Progress in PowerShell, and tqdm in Python all give you a progress bar for near-zero effort:

from tqdm import tqdm
from pathlib import Path
files = list(Path("input").rglob("*.jpg"))
for path in tqdm(files, desc="Converting"):
    pass  # conversion logic here

For long-running cloud jobs, push progress to a simple dashboard (a Google Sheet, an internal status page, or a row in your database) so stakeholders can check in without asking.

Frequently Asked Questions

How many files can I batch convert at once online? Most online services cap batches by total size rather than file count, typically between 100 MB and 1 GB depending on the plan. For 250 MB batches of typical office documents or medium-resolution images, online tools are comfortable. Beyond that, or when privacy is a concern, switch to a local script.

Will batch conversion reduce quality? Only if you choose lossy output settings. Batch conversion itself is no different from single-file conversion in quality terms. The risk is applying the wrong setting to thousands of files at once, which is why testing on a small sample first is essential.

How do I convert different file types in the same batch? Most scripts are easier to maintain when each batch handles one input format. If you have a mixed folder, either sort by extension first and run separate passes, or use a tool like XnConvert or a Python script with format detection that branches per file type.

Can I batch convert files on a Chromebook or iPad? Not with local tools, but online batch converters work well. For iPads, Shortcuts can automate uploading a folder to a web converter and saving results back to Files. For Chromebooks, the Linux container lets you run FFmpeg and ImageMagick directly.

What is the fastest way to batch convert hundreds of videos? FFmpeg with hardware acceleration (videotoolbox on Mac, cuda on NVIDIA, qsv on Intel) combined with GNU parallel to run multiple jobs at once. On a modern workstation, this is typically 5-20 times faster than serial CPU encoding.

How do I batch convert PDFs to Word documents? For text-based PDFs, a Python script with pdf2docx handles this reliably at scale. For scanned PDFs, you need OCR first; LibreOffice and most online services do not produce editable output from image-based PDFs unless OCR is enabled.

Is it safe to batch convert confidential files online? It depends on the service. Look for automatic file deletion, HTTPS transfers, and a clear retention policy. For genuinely sensitive material, a local script keeps files on your machine end to end. Review our file conversion security guide for a full checklist.

How do I resume a batch job after a failure? Write output to a staging directory and check for existing output files before processing each input. A short guard at the top of the loop that skips files whose output already exists makes the script idempotent and safe to re-run. Combined with an error log, you can retry only the files that failed without reprocessing the rest.

CF

ConvertFiles Team

File-format research, converter testing, and practical troubleshooting from the ConvertFiles editorial team.

Reviewed for format accuracy and updated as tools, browser support, and conversion workflows change.

Continue Reading