Request: command line switch to return just a version string

It appears that there’s no way to query any of the duplicati binaries to return just a version string. Such a command is typically expected by users, and is helpful for diagnostics, as well as scripts.

For example, a log analysis script might check what version of duplicati is installed to determine what regular expressions to use when analyzing the logs, if the format changes between versions - or to decline to run on versions which do not generate logs with required details. It would probably also be of use to those who set up centralized configuration management utilities.

1 Like

That would be a useful feature and I guess not hard to implement.

In the meantime, use this fun command (Windows only) to retrieve the current version:

for /f "usebackq tokens=1-2* delims=(" %a in (`Duplicati.CommandLine.exe system-info ^| find "Version name:"`) do @echo (%b

From within a batch script:

@echo off
for /f "usebackq tokens=1-2* delims=(" %%a in (`Duplicati.CommandLine.exe system-info ^| find "Version name:"`) do echo (%%b```