DropMorph › Command line

The dropmorph command

Convert files and folders from a terminal, a script or a scheduled task, with the same engines and presets as the app. Or let a watch folder do it on its own.

Set up

Windows: in Setup, tick Add the "dropmorph" command to PATH. Open a new terminal (PowerShell, Command Prompt or Windows Terminal) and run dropmorph help.

macOS and Linux: ./install.sh adds the command.

Usage

dropmorph convert <files or folders...> --to <format> [options]
dropmorph convert <files or folders...> --preset <preset> [options]
dropmorph watch <folder> --to <format> [options]
dropmorph formats [<format>]
dropmorph presets
dropmorph help [<command>]
dropmorph version

convert

Files can be wildcards (*.heic). Folders convert the files in them that DropMorph knows. Results are saved next to the sources unless you give -o.

# a photo
> dropmorph convert photo.heic --to jpg
# every PNG, smaller WebP files in a "converted" folder
> dropmorph convert *.png --to webp --quality 80 -o converted
# a scans folder and its sub folders, with an app preset
> dropmorph convert D:\Scans --recursive --preset to-pdf
# machine-readable result
> dropmorph convert report.docx --to pdf --json
OptionWhat it does
-t, --to <format>Target format, e.g. jpg, png, pdf, docx, mp4 (see dropmorph formats)
-p, --preset <preset>A preset from the app, by id or name (see dropmorph presets)
-o, --output <folder>Save there instead of next to the sources
-r, --recursiveInclude sub folders
-q, --quality <1-100>Image quality for JPG, WebP, AVIF, …
--overwriteReplace existing output files (default: add a number)
--skipLeave existing output files alone
--keep-datesGive converted files the created and modified dates of the originals
--zipSave the result of each file as one ZIP
--jsonPrint the result as JSON, for scripts and other programs
--quietPrint nothing but errors

watch

Converts files that land in a folder until you press Ctrl+C. A file is converted once it's complete: no longer growing or open in another program. Output goes to a converted folder inside it unless -o is given.

# every new file in D:\Inbox becomes a PDF; originals are moved aside
> dropmorph watch D:\Inbox --to pdf --move-originals
OptionWhat it does
-t, --to <format>Target format
-p, --preset <preset>A preset from the app, by id or name
-o, --output <folder>Where converted files go (default: <folder>\converted)
-r, --recursiveAlso watch sub folders; their files keep the sub folder in the output
--move-originalsMove converted sources to <folder>\originals; files already waiting are converted at start
--settle <seconds>How long a file must stay unchanged before converting (default 2)
--keep-datesKeep the originals' created and modified dates
--zipSave each file's result as one ZIP
--quietPrint nothing but errors
Tip: watch folders are also in the app (Settings → Watch folders), so they keep running in the tray without a terminal.

formats and presets

dropmorph formats lists every format, and dropmorph formats heic shows what one format converts to. dropmorph presets lists the presets saved in the app, both built-in and your own; use them with --preset.

Exit codes

0All files converted
1Some files failed
2Wrong arguments or a missing input
3Nothing to convert

Stop uploading files to convert them.

Drag. Drop. Morphed. Free for Windows, macOS and Linux.