Call a .bat script before and after backup

good evening
I would like to know how to run a .bat script. This .bat leaves the hd online when the backup starts and after it leaves it offline.
I currently use it in Cobian and Iperius, but in Duplicati I found the options but I do not know how to call .bat.

Use the --run-script-before and --run-script-after options. They are avilable from the GUI in Step 5 (Options) under Advanced Optins > Run Script where you can enter the path to your file. I found an example script here.

Thanks for that pointer @saul. Documentation useful to script writers seems scarce.

If reading the example script documentation closely, please note that some exit code documentation from that script is not in beta just yet (only in canary). See Improvements for –run-script-before/after options for history and some other links to scripting information.

Good Morning
take the delay to give the return,
but with the tip worked, I just pointed to the script path.
thank you for the tips !!!