# ๐Ÿ“š Arguments Description This section describe the different arguments and flags used by the tool. - An **argument** is a modifier that is followed by any parameter. - On the other hand, a **flag** is a modifier that don't require any parameter, hence, if the flag is present the feature is enabled, otherwise, the feature is disabled. There is also a [extended version](02-arguments-description.md) of this document available. > [!NOTE] > For compiled binaries, macOS now uses `PhotoMigrator.command`. Linux and Synology SSH continue using `PhotoMigrator.bin`. If you are following the examples below on macOS, replace `PhotoMigrator.bin` with `PhotoMigrator.command`. ## ๐Ÿ–ฅ๏ธ Launcher Flags These flags are handled before the normal argparse parser starts, so they are launcher controls rather than regular feature arguments. | Argument | Description | |----------|-----------------------------------| | `--gui` | Force the Desktop GUI explicitly | | `--tui` | Force the Terminal TUI explicitly | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --gui PhotoMigrator.bin --tui PhotoMigrator.bin --gui --configuration-file ./Config.ini PhotoMigrator.bin --gui --configuration-file /srv/PhotoMigrator/custom.ini ``` Notes: - GUI/TUI startup also honors `--configuration-file`. - Without that argument, both interfaces use `./Config.ini` from the current execution folder by default. ## ๐Ÿงฉ Core Arguments | Argument | Description | |----------------------------------------------------|----------------------------------------------------------------------------------------------------| | `-h`,
`--help` | Show help and exit | | `-v`,
`--version` | Show tool version and exit | | `-config`,
`--configuration-file` | Config file path for CLI and for GUI/TUI startup | | `-noConfirm`,
`--no-request-user-confirmation` | No Request User Confirmation before to execute any Feature. | | `-noLog`,
`--no-log-file` | Disable log file creation | | `-logLevel`,
`--log-level` | Sets Log level: `VERBOSE`, `DEBUG`, `INFO`, `WARNING`, `ERROR` | | `-logFormat`,
`--log-format` | Sets log file format: `LOG`, `TXT`, `ALL` | | `-fnAlbums`,
`--foldername-albums` | Specify the folder name to store all your processed photos associated to any Album. | | `-fnNoAlbums`,
`--foldername-no-albums` | Specify the folder name to store all your processed photos (including those associated to Albums). | | `-fnLogs`,
`--foldername-logs` | Specify the folder name to save the execution Logs. | | `-fnDuplicat`,
`--foldername-duplicates-output` | Specify the folder name to save the outputs of 'Find Duplicates' Feature. | | `-fnExtDates`,
`--foldername-extracted-dates` | Specify the folder name to save the Metadata outputs of 'Extracted Dates'. | | `-exeGpthTool`,
`--exec-gpth-tool` | Specify an external version of GPTH Tool binary. | | `-exeExifTool`,
`--exec-exif-tool` | Specify an external version of GPTH Tool binary. | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --help PhotoMigrator.bin --version ``` --- ## โš™๏ธ General Options Following general arguments have different purposes depending on the Execution Mode. | Argument | Description | |-------------------------------------------|--------------------------------------------------------------------------------------| | `-i`,
`--input-folder` | Input folder to process | | `-o`,
`--output-folder` | Output folder to store results | | `-client`,
`--client` | Service client: `google-takeout`, `google-photos`, `synology`, `immich`, `nextcloud` | | `-id`,
`--account-id` | Account ID (1โ€“3) from `Config.ini` | | `-from`,
`--filter-from-date` | Filter assets from this date | | `-to`,
`--filter-to-date` | Filter assets up to this date | | `-type`,
`--filter-by-type` | Filter assets by type: `image`, `video`, `all` | | `-country`,
`--filter-by-country` | Filter assets by country | | `-city`,
`--filter-by-city` | Filter assets by city | | `-person`,
`--filter-by-person` | Filter assets by person | | `-exFolders`,
`--exclude-folders` | Exclude folder patterns during local-folder processing/migration | | `-exFiles`,
`--exclude-files` | Exclude file patterns during local-folder processing/migration | | `-AlbFolder`,
`--albums-folders` | Use subfolders in folder as albums | | `-rAlbAsset`,
`--remove-albums-assets` | Remove assets inside deleted albums | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --input-folder=/mnt/import --output-folder=/mnt/export PhotoMigrator.bin --filter-from-date=2022-01-01 --filter-to-date=2022-12-31 PhotoMigrator.bin --filter-by-type=video --log-level=debug ``` --- ## ๐Ÿš€ Automatic Migration Process Following arguments allow you to execute the Automatic Migration Process to migrate your assets from one Photo Cloud Service to other, or from two different accounts within the same Photo Cloud service. | Argument | Description | |----------------------------------------|-----------------------------------------------------------------------------------------------| | `-source`,
`--source` `` | Source service or folder: `immich`, `synology`, `nextcloud`, `google-photos`, or `local path` | | `-target`,
`--target` `` | Target service or folder: `immich`, `synology`, `nextcloud`, `google-photos`, or `local path` | | `-move`,
`--move-assets` | Move instead of copy files (`true` or `false`) | | `-dashboard`,
`--dashboard` | Show live dashboard during migration (`true` or `false`) | | `-parallel`,
`--parallel-migration` | Run migration in parallel or sequential (`true` or `false`) | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --source=immich-1 --target=synology-2 PhotoMigrator.bin --source="/home/user/Takeout" --target="/mnt/photos" --move-assets true PhotoMigrator.bin --source=immich-1 --target=synology-2 --dashboard false --parallel-migration false ``` --- ## ๐Ÿ—ƒ๏ธ Google Photos Takeout Management In this mode, you can use more than one optional arguments and flags from the below list. If only the argument `-gTakeout, --google-takeout ` is detected, then the Tool will use the default values for the rest of the flags for this extra mode. Following arguments allow you to interact with Google Photos Takeout Folder. | Argument | Description | |----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| | `-gTakeout`,
`--google-takeout` | Path to Takeout folder (mandatory for this mode) | | `-gofs`,
`--google-output-folder-suffix` | Suffix for output folder (default: `processed`) | | `-gafs`,
`--google-albums-folders-structure` | Album folder structure: `flatten`, `year`, `year/month`, `year-month` | | `-gnas`,
`--google-no-albums-folders-structure` | No-Album folder structure (same values as above; default: `year/month`) | | `-gics`,
`--google-ignore-check-structure` | Ignore Takeout structure validations | | `-gnsa`,
`--google-no-symbolic-albums` | Duplicates Albums assets instead of create symlinks to original asset in . (requires more HDD space) | | `-grdf`,
`--google-remove-duplicates-files` | Removes duplicate files in the output folder. | | `-graf`,
`--google-rename-albums-folders` | Renames albums folders based on content dates. | | `-gsef`,
`--google-skip-extras-files` | Skips extra Google photos like edited/effects. | | `-gsma`,
`--google-skip-move-albums` | Skip moving albums to `` | | `-gSkipGpth`,
`--google-skip-gpth-tool` | Skip processing with GPTH Tool (not recommended) | | `-gSkipPrep`,
`--google-skip-preprocess` | Skips Pre-process Google Takeout folder (not recommended). | | `-gSkipPost`,
`--google-skip-postprocess` | Skips Post-process Google Takeout folder (not recommended). | | `-gKeepTakeout`,
`--google-keep-takeout-folder` | Keeps a untouched copy of your original Takeout folder. (requires double HDD space). | | `-gpthInfo`,
`--show-gpth-info` | Show GPTH progress messages (default: true). | | `-gpthError`,
`--show-gpth-errors` | Show GPTH error messages (default: true). | | `-gpthNoLog`,
`--gpth-no-log` | Skip Save GPTH log messages into output folder. | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --google-takeout="/home/user/Takeout" PhotoMigrator.bin --google-takeout="/home/user/Takeout" --google-remove-duplicates-files --google-skip-extras-files PhotoMigrator.bin --google-takeout="/home/user/Takeout" --google-albums-folders-structure=year/month or using short arguments, PhotoMigrator.bin -gTakeout="/home/user/Takeout" -gafs="year/month" -grdf -gsef PhotoMigrator.bin -gTakeout="/home/user/Takeout" -gnsa -gofs="cleaned" PhotoMigrator.bin -gTakeout="/home/user/Takeout" -gics -gKeepTakeout=true ``` --- ## ๐ŸŽ iCloud Takeout Management In this mode, you can use more than one optional arguments and flags from the below list. If only the argument `-iTakeout, --icloud-takeout ` is detected, then the Tool will use the default values for the rest of the flags for this extra mode. Following arguments allow you to interact with Apple iCloud Photos export folders. | Argument | Description | |----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------| | `-iTakeout`,
`--icloud-takeout` | Path to the iCloud export folder (mandatory for this mode) | | `-iofs`,
`--icloud-output-folder-suffix` | Suffix for the iCloud processed output folder (default: `processed`) | | `-iafs`,
`--icloud-albums-folders-structure` | Reconstructed album folder structure: `flatten`, `year`, `year/month`, `year-month` | | `-inas`,
`--icloud-no-albums-folders-structure` | No-Album folder structure (same values as above; default: `year/month`) | | `-insa`,
`--icloud-no-symbolic-albums` | Duplicate reconstructed iCloud album assets instead of creating symlinks in `` (default: symlinks) | | `-iMem`,
`--icloud-include-memories` | Also reconstruct iCloud `Memories` CSV collections as folders. Pre-selected by default in Web/TUI/GUI | | `-iNExif`,
`--icloud-prefer-native-exif-writer` | Prefer the native EXIF writer when possible. Pre-selected by default in Web/TUI/GUI | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --icloud-takeout="/home/user/iCloudExport" PhotoMigrator.bin --icloud-takeout="/home/user/iCloudExport" --icloud-no-symbolic-albums PhotoMigrator.bin --icloud-takeout="/home/user/iCloudExport" --icloud-include-memories PhotoMigrator.bin --icloud-takeout="/home/user/iCloudExport" --icloud-prefer-native-exif-writer or using short arguments, PhotoMigrator.bin -iTakeout="/home/user/iCloudExport" -iofs="cleaned" PhotoMigrator.bin -iTakeout="/home/user/iCloudExport" -iafs="year/month" -inas="year/month" PhotoMigrator.bin -iTakeout="/home/user/iCloudExport" -insa -iMem ``` --- ## ๐Ÿ–ผ๏ธ Google Photos / Synology / Immich / NextCloud Management To use following features, it is mandatory to use the argument `--client=[synology, immich, nextcloud, google-photos]` to specify which Photo Service do you want to use. You can optionally use the argument `--id=[1-3]` to specify the account id for a particular account defined in Config.ini. If more than one optional arguments are detected, only the first one will be executed. Following arguments allow you to interact with Google Photos, Synology, Immich, and NextCloud. | Argument | Description | |----------------------------------------------------|----------------------------------------------------------------------------------------------| | `-uAlb`,
`--upload-albums` | Upload all subfolders as albums | | `-dAlb`,
`--download-albums` | Download specific albums | | `-uAll`,
`--upload-all` | Upload all assets and albums from input folder | | `-prefCanAlb`,
`--prefer-canonical-album-names` | Normalize new destination album names during cloud uploads and Automatic Migration | | `-consSimAlb`,
`--consolidate-similar-albums` | Reuse and consolidate equivalent album families during cloud uploads and Automatic Migration | | `-consAlbNames`,
`--consolidate-albums-names` | Consolidate equivalent existing cloud album families directly in the target service | | `-dAll`,
`--download-all` | Download all assets and albums | | `-renAlb`,
`--rename-albums` | Rename albums using text, wildcard, or regex | | `-rAlb`,
`--remove-albums` | Delete albums using text, wildcard, or regex | | `-prevAlbAct`,
`--preview-album-actions` | Preview rename/remove/consolidation matches and confirm | | `-rEmpAlb`,
`--remove-empty-albums` | Delete empty albums | | `-rDupAlb`,
`--remove-duplicates-albums` | Delete duplicate albums | | `-mDupAlb`,
`--merge-duplicates-albums` | Merge duplicate albums | | `-rAll`,
`--remove-all-assets` | Delete all assets and albums (DANGER!) | | `-rAllAlb`,
`--remove-all-albums` | Delete all albums (assets optional) | | `-OTP`,
`--one-time-password` | Use 2FA login with OTP token | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --client=immich --upload-all=/mnt/pictures PhotoMigrator.bin --client=synology --download-albums "album1 album2 album3" --output-folder=/mnt/backup PhotoMigrator.bin --client=synology --remove-empty-albums --one-time-password or using short arguments, PhotoMigrator.bin -client=synology -uAlb="Albums" -id=1 PhotoMigrator.bin -client=immich -dAlb="Vacaciones,Navidad" -o="Backups" PhotoMigrator.bin -client=synology -rAlb="tmp_*" -rAlbAsset -OTP ``` --- ## ๐Ÿ› ๏ธ Standalone Features If more than one Feature is detected, only the first one will be executed. Following arguments can be used to execute the Tool in any of the usefully additional Extra Standalone Features included. | Argument | Description | |--------------------------------------------------|--------------------------------------------------------------------------------------------------------------| | `-fixSym`,
`--fix-symlinks-broken` | Fix broken symlinks in folder | | `-renFldcb`,
`--rename-folders-content-based` | Rename folders based on media content date | | `-orgDate`,
`--organize-local-folder-by-date` | Create a processed copy of a local folder and reorganize its media by date | | `-olfs`,
`--organize-output-folder-suffix` | Change generated suffix for `--organize-local-folder-by-date` when no explicit `--output-folder` is provided | | `-olstr`,
`--organize-folder-structure` | Select layout for organized output: `flatten`, `year`, `year/month`, `year-month` | | `-omove`,
`--move-original-files` | Move original files instead of copying them first when organizing a local folder by date | | `-findDup`,
`--find-duplicates` | Find duplicates in folder(s). Action: `list`, `move`, `remove` | | `-procDup`,
`--process-duplicates` | Execute actions from a reviewed duplicates CSV file | #### ๐Ÿงช Examples: ```bash PhotoMigrator.bin --fix-symlinks-broken="/mnt/albums" PhotoMigrator.bin --rename-folders-content-based="/mnt/albums" PhotoMigrator.bin --organize-local-folder-by-date="/mnt/unsorted" --organize-folder-structure=year/month PhotoMigrator.bin --organize-local-folder-by-date="/mnt/unsorted" --output-folder="/mnt/organized" PhotoMigrator.bin --organize-local-folder-by-date="/mnt/unsorted" --move-original-files --organize-output-folder-suffix=archive PhotoMigrator.bin --find-duplicates list "/mnt/folder1" "/mnt/folder2" PhotoMigrator.bin --process-duplicates revised_duplicates.csv ``` --- ## ๐Ÿงช Examples description: Below you can find a short description of above examples ### โš™๏ธ General Options ```bash PhotoMigrator.bin --input-folder=/mnt/import --output-folder=/mnt/export Process input folder to fix metadatas and save the result in output folder. ``` ```bash PhotoMigrator.bin --filter-from-date=2022-01-01 --filter-to-date=2022-12-31 Filters assets from 2022 only. ``` ```bash PhotoMigrator.bin --filter-by-type=video --log-level=debug Processes only video files and shows debug logs. ``` --- ### ๐Ÿš€ Automatic Migration ```bash PhotoMigrator.bin --source=immich-1 --target=synology-2 Migrates all content from Immich account 1 to Synology account 2. ``` ```bash PhotoMigrator.bin --source=/mnt/photos --target=/mnt/synology --move-assets=true Migrates local folder to target and removes files from the source. ``` ```bash PhotoMigrator.bin --source=synology-1 --target=immich-1 --parallel-migration=false Uses sequential migration instead of parallel. ``` --- ### ๐Ÿ—ƒ๏ธ Google Takeout Management ```bash PhotoMigrator.bin --google-takeout=/home/user/Takeout Processes Google Takeout folder using default options. ``` ```bash PhotoMigrator.bin --google-takeout=/home/user/Takeout --google-remove-duplicates-files --google-skip-extras-files Removes duplicates and skips extra photos like effects. ``` ```bash PhotoMigrator.bin --google-takeout=/home/user/Takeout --google-albums-folders-structure=year/month Organizes albums by year and month structure. ``` --- ### ๐Ÿ–ผ๏ธ Synology / Immich Management ```bash PhotoMigrator.bin --client=immich --upload-all=/mnt/pictures Uploads all photos to Immich, organizing by subfolder albums. ``` ```bash PhotoMigrator.bin --client=synology --download-albums "album1 album2 album3" --output-folder=/mnt/backup Downloads selected albums from Synology. ``` ```bash PhotoMigrator.bin --client=synology --remove-empty-albums --one-time-password Removes all empty albums from Synology. ``` --- ### ๐Ÿ› ๏ธ Other Standalone Features ```bash PhotoMigrator.bin --fix-symlinks-broken="/mnt/albums" Fix symbolic links found in the given folder ``` ```bash hotoMigrator.run --rename-folders-content-based="/mnt/albums" Renames album folders based on content creation dates. ``` ```bash PhotoMigrator.bin --find-duplicates list "/mnt/folder1" "/mnt/folder2" Lists duplicate files across multiple folders. ``` ```bash PhotoMigrator.bin --process-duplicates revised_duplicates.csv Processes duplicates based on a CSV file with actions. ``` --- ## ๐Ÿ  [Back to Main Page](../README.md) --- ## ๐ŸŽ–๏ธ Credits: I hope this can be useful for any of you. Enjoy it! (c) 2024-2026 by Jaime Tur (@jaimetur).