Skip to main content

Documentation Index

Fetch the complete documentation index at: https://photocli.com/llms.txt

Use this file to discover all available pages before exploring further.

photo-cli returns a specific numeric exit code when it finishes. A code of 0 means the command completed successfully. Any other value indicates that something went wrong. You can check these codes in shell scripts, CI pipelines, or any automation that calls photo-cli, so you can detect and handle errors programmatically.

Exit codes

CodeNameWhen it occurs
0SuccessCommand completed successfully
1ParseArgsFailedInvalid or missing command-line arguments
2AppSettingsInvalidFileThe settings file is corrupt or cannot be read
3UnexpectedErrorAn unhandled exception occurred during execution
10ApiKeyStoreValidationFailedAPI key validation failed
11AddressOptionsValidationFailedInvalid options passed to the address command
12InfoOptionsValidationFailedInvalid options passed to the info command
13CopyOptionsValidationFailedInvalid options passed to the copy command
14SettingsOptionsValidationFailedInvalid options passed to the settings command
15ArchiveOptionsValidationFailedInvalid options passed to the archive command
20InputFolderNotExistsThe path given with --input does not exist
21NoPhotoFoundOnDirectoryNo supported photo files were found in the input folder
22OutputFolderIsNotEmptyThe --output folder already exists and is not empty
23OutputPathIsExistsThe output path already exists as a file
24OutputPathDontHaveWriteFilePermissionphoto-cli does not have write permission at the output path
25OutputPathDontHaveCreateDirectoryPermissionphoto-cli cannot create directories at the output path
26InputFileNotExistsThe file given with --input does not exist (used by the address command)
27FileVerifyErrorsFile integrity verification failed after copying
30PhotosWithNoDatePreventedProcess--no-taken-date was set to PreventProcess and at least one photo has no EXIF date
31PhotosWithNoCoordinatePreventedProcess--no-coordinate was set to PreventProcess and at least one photo has no GPS coordinates
32PhotosWithNoCoordinateAndNoDatePreventedProcessBoth date and coordinate are missing and PreventProcess is in effect
33PhotosWithInvalidFileFormatPreventedProcess--invalid-format was set to PreventProcess and photos with invalid or unreadable EXIF data were found
34PhotosWithMissingReverseGeocodeInfoAsRequested--missing-reverse-geocode was set to PreventProcess and reverse geocoding could not be completed for all photos
35PhotosWithUnexpectedDateRangePreventedProcessThe photo date range exceeded the threshold set by --expected-day-range
40PropertyNotFoundThe settings key passed with --key does not exist
41InvalidSettingsValueThe value passed to the settings command is not valid for the given key
42InvalidSettingsLogLevelChangeThe log level value is not in the required Namespace=LogLevel format
50AlbumExistAn album with the specified name already exists
51InconsistencyOnSavingPhotosToDatabaseSaving archived photos to the database failed due to a data inconsistency
52InconsistencyOnSavingUserDefinedAlbumToDatabaseSaving a user-defined album to the database failed due to a data inconsistency
53AlbumNameMustBeUniqueWhileAddingOrUseUpdateAn album with the new name already exists; use the --update-album flag instead
54AlbumNotFoundByIdNo album with the specified ID was found in the database
55NoPhotosToAddInAlbumNo valid photos are available to add to the album
56NoDataRangeFoundOnPhotosA date-range album could not be created because the photos have no valid date range
57ExistingAlbumConfigurationNotValidThe existing album configuration in the database is corrupted or invalid
60NoArchiveDatabaseFoundThe archive database file was not found at the expected location
61NoPhotoFoundToListNo photos matched the specified query filters
62AlbumNotFoundByNameNo album with the specified name was found in the database

Using exit codes in shell scripts

Check $? immediately after a photo-cli command to detect failure and take appropriate action:
photo-cli copy \
  --output out \
  --process-type Single \
  --naming-style DateTimeWithSeconds \
  --number-style PaddingZeroCharacter \
  --no-taken-date Continue \
  --no-coordinate Continue

if [ $? -ne 0 ]; then
  echo "photo-cli failed"
fi