The command line
Everything Cobalt Photo does to many pictures at once, from a console, a .bat file or your own program — with the same formats, quality and care as its windows. No window opens.
Ta strona nie jest jeszcze przetłumaczona, dlatego wyświetla się po angielsku.
cobaltphoto /? in any console prints the help; its last line leads here.cobaltphoto convert *.heic --to jpg
cobaltphoto resize D:\Site -r --long 1600 --replace
cobaltphoto find D:\Photos -r "stars:5 taken:2025" | cobaltphoto pdf --name "Best of 2025"
Start
The command comes with Cobalt Photo: type cobaltphoto in Command Prompt, PowerShell, Windows Terminal or a .bat file, in any folder. Windows makes it known to every console itself; nothing to set up or add to the path.
cobaltphotoalone, orcobaltphoto /?, lists every command.cobaltphoto convert /?— or any other command — gives that command's options and examples.- The help and the messages are in the language of Settings → General; the commands and options are the same in every language.
It is a console program: it opens no window and shows nothing in the taskbar. To turn the command off, Windows has Settings → Apps → Advanced app settings → App execution aliases, cobaltphoto.exe.
Files and folders
After the command come the pictures, as many as needed, in any mix:
| Typed | What it gives |
|---|---|
photo.jpg | That picture. |
"D:\Photos\2026" | The pictures in the folder. With -r, those in its subfolders too. |
*.heic, D:\Shots\IMG_*.png | The pictures the mask matches — Command Prompt does not expand masks, so cobaltphoto does. With -r, in subfolders too. |
| nothing, with paths piped in | The paths, one per line: cobaltphoto find … | cobaltphoto clean. |
It reads every picture Cobalt Photo opens: JPG, PNG, HEIC, WebP, AVIF, JPEG XL, TIFF, GIF, BMP, ICO, SVG, Photoshop, Krita, OpenRaster, TGA, macOS icons and the RAW files of over 600 cameras — all formats. Hidden and system files are left out, as Explorer does. A path in quotes may have spaces.
Options of every command
| Option | What it does |
|---|---|
-o, --out <folder> | Where the new files go; the folder is made when it is not there. Without it, next to each original. |
-r, --recurse | Folders with their subfolders. |
--replace | Write over a file of the same name instead of making photo (2).jpg — or, for clean and resize, change the original itself. The old file goes to the Recycle Bin, so it can be put back. (A drive without a Recycle Bin, such as some memory cards, deletes it.) |
--dry-run | Show what would be done, file by file, and change nothing. Worth it before rename, --replace and import --move. |
--json | The results as JSON, one line per file — what is in it. |
-q, --quiet | Only the files that failed and the summary. |
--no-progress | No progress line. It is off anyway when the output goes to a file or a pipe. |
convert — into another format
cobaltphoto convert <files> --to <format> [options]
The same as Convert: each picture upright, in the format asked for, next to the original or into -o. A RAW file's picture goes into a folder of the format's name beside it (JPEG), so it is not taken for the camera's own JPEG. The original is never changed. The place it was taken is never kept.
| Option | What it does |
|---|---|
--to jpg | png | webp | avif | jxl | heic | tiff | gif | bmp | ico | jxr | tga | pdf | The format. HEIC needs Windows' HEVC Video Extensions — why. |
--quality 1–100 | For JPG, WebP, AVIF and JPEG XL. Without it: JPG as in Settings → Converter (85 as it comes), WebP 75, AVIF 65, JPEG XL 85. |
--lossless | WebP, AVIF and JPEG XL without loss. |
--tiff lzw | zip | none | TIFF's compression (lzw as it comes). |
--ico-sizes 16,32,48,256 | The sizes inside an ICO. |
--pdf-page picture | a4 | letter | A PDF's page: the picture's own size, A4 or Letter. |
--pdf-each | One PDF per picture (as it comes: one PDF of all — see also pdf). |
--long 2048 | Made smaller: the long side, in pixels. |
--percent 50 | Made smaller: a share of the size. |
--size 1920x1080 with --fit crop | fit | stretch | Exactly that size: its middle cut to the shape (crop, as it comes), the whole of it fitted inside, or stretched. |
--no-sharpen | No sharpening after making smaller. |
--keep date-camera | date | none | What stays of the picture's data: the date and the camera (as it comes), the date, or nothing. |
--mark "© Anna" or --mark-logo logo.png | A watermark: a text, or a logo — watermarks. |
--mark-place bottom-right | bottom | bottom-left | top-right | top | top-left | left | middle | right | all-over | Where it is drawn (bottom-right as it comes). |
--mark-size 4, --mark-opacity 75, --mark-dark | Its height in percent of the short side; how opaque it is (10–100); dark letters with a light glow. |
--develop | A RAW file developed from its sensor data, not the camera's JPEG inside it — RAW. With it: --auto-white (white balance by the picture), --vivid, --noise off | low | strong, --no-bright-sky. |
cobaltphoto convert *.heic --to jpg
cobaltphoto convert D:\Shots -r --to webp --long 1600 --mark "© Anna" -o D:\Web
cobaltphoto convert logo.png --to ico --ico-sizes 16,32,48
cobaltphoto convert *.cr3 --develop --vivid --to tiff -o D:\Print
resize — smaller, or to an exact size
cobaltphoto resize <files> --long <pixels> | --percent <n> | --size <w>x<h> [options]
As the Manager's Resize: each picture in its own format, its data kept. Copies beside the originals with the size in their name (photo (1600 px).jpg), or into -o — or with --replace the originals themselves, the old ones to the Recycle Bin. A RAW file gets a JPG copy. An animation, an icon and a picture already that small are left as they are. Its options: --long, --percent, --size with --fit, --no-sharpen as for convert, and --quality for JPG.
cobaltphoto resize *.jpg --long 1600
cobaltphoto resize D:\Site -r --percent 50 --replace
cobaltphoto resize avatar.png --size 512x512 --fit crop
mail — smaller for mail
cobaltphoto mail <files> [--long <pixels>] [--quality 1–100]
The drop panel's Smaller for mail: a JPG small enough to send, large enough to look at, beside each picture as photo (small).jpg. The long side as in Settings (2048 as it comes), unless --long says.
cobaltphoto mail IMG_0412.heic IMG_0413.heic
cobaltphoto mail D:\Trip -o D:\ToSend
pdf — pictures into a PDF
cobaltphoto pdf <files> [--name <name>] [--page picture | a4 | letter] [--each]
One PDF of all the pictures, a page each, in the order given — named after their folder (or the one picture), or --name. With --each, one PDF per picture. Next to the first picture, or into -o.
cobaltphoto pdf scan*.jpg --name Contract --page a4
cobaltphoto pdf D:\Receipts --each -o D:\PDF
extract — frames and icon sizes
cobaltphoto extract <files> [--frame <n>] [--size <pixels>]
As the viewer's Save frame and Save size, as PNG with their transparency:
- An animated GIF, WebP or PNG: all its frames into a folder beside it, anim (frames) — or only frame
--frame(counted from 1), beside it. - An ICO, CUR or ICNS: all its sizes into app (sizes) — or only the size
--size(its width), beside it.
cobaltphoto extract anim.gif
cobaltphoto extract anim.webp --frame 12
cobaltphoto extract app.icns --size 256 -o D:\Icons
clean — without personal data
cobaltphoto clean <files> [--location-only] [--replace]
As the Manager's Clean: who, where and with what is taken out — the location, the camera's serial number, the author, comments — and what the picture needs to look the same stays, its date too. A JPG, PNG or WebP is not encoded again: only its data is cut out, and the result must open as the same picture before it is written. Other formats get a clean JPG.
- As it comes: a copy, photo (clean).jpg, beside it or into
-o. --location-only: only where it was taken.--replace: the file itself, the old one to the Recycle Bin. Its dates stay.
cobaltphoto clean *.jpg -o D:\ToSend
cobaltphoto clean D:\Blog -r --location-only --replace
rotate — turn or flip
cobaltphoto rotate <files> right | left | 180 | flip-h | flip-v
Free. The files themselves are turned, as the viewer turns them. A JPG keeps every pixel: only its orientation tag changes, which every viewer and Windows follow. PNG, TIFF, BMP and GIF are written again without loss. RAW files and SVG are left as they are.
cobaltphoto rotate IMG_0412.jpg right
cobaltphoto rotate scans\*.png 180
meta — stars, labels, tags, text, dates
cobaltphoto meta <files> [what to set]
As the Manager's Metadata. Written into JPG and PNG themselves; RAW, HEIC, TIFF and WebP get an .xmp beside them, which Lightroom, darktable and the Manager read too. Only what is asked for changes; an empty value removes it: --title "".
| Option | What it sets |
|---|---|
--stars 0–5 | rejected | The stars; 0 removes them, rejected marks it as rejected. |
--label red | yellow | green | blue | purple | none | The colour label. |
--tags "sea,2026" | These tags instead of its own. |
--add-tags, --remove-tags | Tags added to its own, or taken from them. |
--title, --description, --author, --copyright | The texts. Several authors with ; between them. |
--taken "2026-10-12 14:30" | The date taken, the same for all. |
--shift +1h | -30m | +1d2h | Each date taken moved — a camera's clock set wrong, or in another time zone. |
--location 41.3851,2.1734 | Where it was taken: latitude, longitude. |
--no-location | Where it was taken removed. |
cobaltphoto meta best\*.jpg --stars 5 --label green
cobaltphoto meta *.cr3 --shift -1h
cobaltphoto meta D:\Trip -r --add-tags "Rome,2026" --author "Anna"
rename — new names from a pattern
cobaltphoto rename <files> --pattern "{date}_{n}" [options]
As the Manager's Rename. The pattern's words:
| Word | Becomes |
|---|---|
{date}, {time} | When it was taken (or the file's date, when it has none). |
{place}, {country} | The town and country it was taken in, from its location. |
{camera} | The camera. |
{name}, {folder} | Its name now; its folder's name. |
{n} | A number, in the order taken. |
A word the picture has nothing for is left out with its _ or -. A name taken gets (2). The RAW file, .xmp, .aae and Live Photo .mov of the same name are renamed with the picture. Options: --date iso | compact | dots | month (2026-10-12, 20261012, 12.10.2026, 2026-10), --start 1, --digits 3, --per-day (numbers start again each day), --order taken | name, --no-file-date, --lower-ext (.JPG becomes .jpg).
cobaltphoto rename *.jpg --pattern "{date}_{place}_{n}" --dry-run
cobaltphoto rename D:\Trip --pattern "{country} {date} {n}"
import — from a card into the library
cobaltphoto import <card or folder> [options]
As the Manager's Import & sort: the pictures and videos copied into the library, into folders by date or by trip, each copy checked byte by byte, its dates kept. The ones imported before are left out; a shot's RAW and JPEG stay together. A camera card (a drive with DCIM) is read with all its folders; another folder with -r.
| Option | What it does |
|---|---|
--to <library> | Where they go — as it comes, the Manager's import's library (Pictures). |
--layout year-month | year-day | day | trips | one | The folders: 2026\2026-10 (as it comes), 2026\2026-10-12, 2026-10-12, 2026-10-12 Rome for trips, or straight into the library. |
--trip-hours 24 | For trips: a longer gap between shots starts a new trip. |
--all | Also the ones imported before. |
--no-videos | Pictures only. |
--rename "{date}_{n}" | New names from a pattern, as rename. |
--move | Sort a folder: the files moved, not copied. |
--delete | From the card after each checked copy. |
cobaltphoto import E:\ --layout trips
cobaltphoto import D:\Downloads --move --to D:\Photos
duplicates — the same pictures
cobaltphoto duplicates <folders> [--series very | quite | little] [--small]
As the Manager's Duplicates search: byte-for-byte copies and the same picture in another size or format — and with --series, shots of a series that are almost the same. It only lists them, each group with its pictures, the largest first; it deletes nothing — what to delete is yours to choose, in the Manager or from --json in a script of your own. --small takes pictures under 256 px too.
cobaltphoto duplicates D:\Photos -r
cobaltphoto duplicates D:\Photos D:\Downloads -r --json > duplicates.json
find — pictures by what they are
cobaltphoto find <folders> "<query>"
The Manager's search, in the same words. It prints the paths that match, one per line — for a file, or a pipe into another command. Without a folder, the current one.
| Query | Finds |
|---|---|
taken:2025, taken:jan, taken:>2024-06-01, taken:7d | When taken: a year, a month, after a day, the last 7 days. |
camera:sony, camera:none | The camera. |
in:barcelona, in:"new york"~10km, gps:no | Where: a town, region or country, near a place; with or without a location. |
stars:>=4, label:red, tag:sea | Stars, colour label, tag. |
res:4k, orient:portrait, mp:>=12 | Size in pixels, shape, megapixels. |
size:>5mb, type:raw, modified:yesterday | The file's size, kind, when it changed. |
time:evening, -*.png, match:any | Time of day; - leaves out; match:any for any of the conditions instead of all. |
cobaltphoto find D:\Photos -r "stars:5 taken:2025"
cobaltphoto find D:\Photos -r "gps:yes" | cobaltphoto clean --location-only
cobaltphoto find D:\Photos -r "type:raw taken:<2020" > old-raw.txt
info — what a picture is
cobaltphoto info <files> [--json]
Free. Its kind, size in pixels and bytes; when and with what it was taken (camera, lens, focal length, aperture, shutter, ISO); where, with the town and the height; its stars, label, tags, title and author; an animation's frames, an icon's sizes.
cobaltphoto info IMG_0412.jpg
cobaltphoto info D:\Trip -r --json > trip.json
wallpaper and lockscreen
cobaltphoto wallpaper <file> [--fit fill | fit | stretch | center | tile]
cobaltphoto lockscreen <file>
Free. One picture as the desktop background on every monitor (fill as it comes), or as the lock screen's picture. Any picture Cobalt Photo opens: it is made an upright JPG first, in Cobalt Photo's own folder, so the original can move or go.
What it writes
A line about what is about to be done, a line per file — ✓ with what was made, or ✗ with why not — then the summary: how many, how long, the sizes before and after. Under the lines a progress bar counts on: how far, how many of how many, how many failed, about how long is left. Windows Terminal shows the same progress on its tab and its button in the taskbar. When the output goes to a file or a pipe, there is no progress bar and no colour; find then writes the paths alone.
--json
One JSON object per line, nothing else on the output — for ConvertFrom-Json in PowerShell, jq, or any program. Letters outside English are written as \u escapes, so the lines read the same in any console.
| Command | Each line |
|---|---|
| convert, resize, mail, pdf, extract, clean, rotate, meta, rename, import | {"file": …, "ok": true, "made": …, "note": …}, or {"file": …, "ok": false, "error": …} |
| info | file, format, width, height, bytes, taken, camera, lens, exposure, fnumber, iso, focal, latitude, longitude, altitude, place, stars, label, tags, title, description, author, frames, seconds, sizes — what it does not know is null. |
| duplicates | A group: {"kind": "exact" | "same" | "series", "bytes": …, "files": [{"path", "width", "height", "bytes"}, …]} |
| find | {"path": …} |
Exit codes
| Code | Means |
|---|---|
0 | Done: every file. |
1 | Some files failed, or were not found — the others are done. |
2 | A wrong command or option: nothing was done. The error says which. |
3 | The command is Pro's, and Pro is not open: nothing was done. |
4 | No pictures to work on — or find found none. |
In scripts
A .bat file that converts what is dropped on it and says when something failed:
@echo off
cobaltphoto convert %* --to jpg --long 2048 -o "%USERPROFILE%\Desktop\For mail"
if errorlevel 1 pause
PowerShell, reading the results:
$big = cobaltphoto info D:\Photos -r --json | ConvertFrom-Json | Where-Object { $_.width -ge 6000 }
$big | ForEach-Object { $_.file }
In Windows PowerShell 5.1, a pipe between two programs passes only English letters unless $OutputEncoding = [Text.Encoding]::UTF8 is set first; PowerShell 7, Command Prompt and --json need nothing.
Pro
rotate, info, wallpaper and lockscreen are always free, as the viewer is. The other commands are Cobalt Photo Pro's, as in the app's windows: open in the 14-day trial and with a subscription. Without it, such a command says so, does nothing and ends with code 3. A subscription just bought counts at once: the command asks the Microsoft Store when Pro looks closed.