JSON command line

Batch Convert Files from the Windows Command Line

Use the standalone installation’s JustConverter.Cli.exe to convert files from PowerShell. Test one copied file first, use a separate output folder and read the per-file result before automating a batch.

By Osenpa · Updated
On this page

Before you start

  • The standalone installation of Just Converter.
  • One copied test file and one writable output folder.
  • PowerShell, which is included with Windows.

The Microsoft Store package does not register a PowerShell command alias. This path-based workflow is for the standalone installation, where JustConverter.Cli.exe is in the cli folder.

Follow these steps

  1. Open PowerShell in the app folder

    In File Explorer, open the standalone installation folder. Type powershell in its address bar and press Enter.

  2. Read the available options

    Run this command, then check the convert command and options for your installed version.

    .\cli\JustConverter.Cli.exe --help
  3. Convert one sample

    Use a copied PNG photo. This example places Sunflower.png in a folder named Conversion test under Pictures. Run the command below; adjust the paths if your Pictures folder is elsewhere.

    $inputFile = "$env:USERPROFILE\Pictures\Conversion test\Sunflower.png"
    $outputFolder = "$env:USERPROFILE\Pictures\Converted test"
    .\cli\JustConverter.Cli.exe convert --input $inputFile --format jpg --output $outputFolder --collision rename

  4. Check the result

    Read $LASTEXITCODE immediately after the command. Open the JPG in Converted test. A created file alone is not proof the conversion succeeded.

  5. Expand only after the test works

    Choose rename, overwrite or skip deliberately. Add --recursive only when nested folders belong in the job. Use --json for per-file results in a script; the command reference below explains those fields.

Check your result

  • The sample converts successfully, opens correctly and leaves its source intact.
  • The script handles nonzero exit codes and individual failures. A startup error can return no JSON.
If you need more help

When to use this method

The command-line interface, or CLI, is useful for repeatable local jobs and scripts. Use the formats listed by your installed version.

Command options and result codes

convert --input <path> --format <format> selects the job. Use --output <directory> for the destination and --profile <id> for an existing compatible profile. The command-line option remains available, but Just Converter 1.2.6 no longer has a saved-profile editor in its desktop interface.

--collision rename|overwrite|skip controls existing output names. --recursive includes nested folders. --json returns machine-readable results; inspect each file’s status, outputs and safeErrorCode.

Exit codes: 0 success; 1 usage or validation error; 2 no successful outputs; 3 partial success; 4 canceled; 5 required engine missing; 6 security or resource limit; 7 input/output or system failure. Capture $LASTEXITCODE before another native command changes it.

If the command fails or returns mixed results

Read the JSON result for each file before looking only at the final exit code. Check quoted paths, the chosen operation, output permissions, collision behavior and optional components. Read $LASTEXITCODE immediately after the converter command, before another native command changes it. Do not treat a created file as proof of success until the result status and the file itself both pass inspection.

Need the app?

Just Converter. Check requirements and download options.