We need variables {STRING}, {TIMESTAMP}, {TYPE} and {FILENAME} among others, and we can pass parameters executing script

Questions about Cobian Reflector
Post Reply
streik
Posts: 19
Joined: 28 Aug 2022, 07:21

We need variables {STRING}, {TIMESTAMP}, {TYPE} and {FILENAME} among others, and we can pass parameters executing script

Post by streik »

We need variables {STRING}, {TIMESTAMP}, {TYPE} and {FILENAME} among others, and we can pass them as parameters when executing a script or program, in an event before or after the backup.

For example, these variables are necessary, because they make the work much easier, to be able to work later on the compressed files of the backup or folders created in the backup:

* {STRING} = Exactly the same integer string prefix or suffix, used by cobian

yyyy-mm-dd_hh;mm;ss_full

yyyy-mm-dd_hh;mm;ss_incremental

yyyy-mm-dd_hh;mm;ss_differential

* {FILENAME} = filename compress without timestamp, and without extension

* {FULLFILENAME} = filename compress with timestamp, and withOUT extension

{TIMESTAMP} = yyyy-mm-dd_hh;mm;ss without spaces, because the parameters can be worked without quotes if they are a whole word.

{TYPE} = full, incremental, differential

Examples of how cobian variables could be added, when executing a script through a command:

/C /MIN "script1.bat "{FILENAME}" {TYPE} {other_parameter} {other_parameter}"

/C /MIN "script2.bat "{DATEHOUR}" {other_parameter} {other_parameter}"

/C /MIN "script3.bat "{TYPE}" {other_parameter} {other_parameter}"

...
...
Last edited by streik on 13 Dec 2022, 22:49, edited 1 time in total.
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: We need variables {STRING}, {TIMESTAMP}, {TYPE} and {FILENAME} among others, and we can pass parameters executing sc

Post by cobian »

:OK but many of those can be obtained using parameters.
--
Luis Cobian
Cobian Backup's creator
streik
Posts: 19
Joined: 28 Aug 2022, 07:21

Re: We need variables {STRING}, {TIMESTAMP}, {TYPE} and {FILENAME} among others, and we can pass parameters executing sc

Post by streik »

Add parameter %TYPE = Type of backup = full, incremental, differential

Thanks
Last edited by streik on 13 Dec 2022, 22:52, edited 1 time in total.
streik
Posts: 19
Joined: 28 Aug 2022, 07:21

Re: We need variables {STRING}, {TIMESTAMP}, {TYPE} and {FILENAME} among others, and we can pass parameters executing sc

Post by streik »

What would be the one that the program is currently doing. If you set it to "full", but it is currently performing an incremental, the %TYPE variable should return incremental.
Post Reply