Pre / Post commands not possible
Hello.
On the AMS (Windows-Server) is a batch file under "C:\Batch\delete.cmd".
However, this is not executed.
As an agent I have chosen the AMS myself.
Why is my batch file not running? As test there is only
echo hallo
exit
Anhang | Größe |
---|---|
2017-10-13 15_33_04-Backup Management Konsole.jpg | 40.17 KB |

- Anmelden, um Kommentare verfassen zu können

Hi,
You should also specify the Working directory (Arbeitsverzeichnis)
- In the Working directory field, specify a path to a directory where the command/batch file will be executed. This is a directory context of the command. This is not the folder with the batch file. This is equivalent to issuing command "cd FOLDERNAME" before running actual script.
For more information please refer to Acronis Software: Troubleshooting Pre/Post Commands Issues.
- Anmelden, um Kommentare verfassen zu können
In reply to Hi,… by truwrikodrorow…

Hmm...
Can you give me a concrete example?
Thank you.
- Anmelden, um Kommentare verfassen zu können

Some examples from another discussion.
- Anmelden, um Kommentare verfassen zu können
In reply to Hmm… by truwrikodrorow…


Can i do this?
@echo off & setlocal
set "SrcDir=D:"
set "Exclude=".meta" "x""
del /q "%SrcDir%\*.*" 2>NUL
set "DoNotDelete="
for /f "delims=" %%d in ('dir /b /a:d "%SrcDir%"') do (
for %%e in (%Exclude%) do (
if "%%d" equ "%%~e" set "DoNotDelete=1"
)
if not defined DoNotDelete rd /s /q "%SrcDir%\%%d"
set "DoNotDelete="
)
- Anmelden, um Kommentare verfassen zu können


The script now works. Great!! I want to delete the removable disks before every backup. Unfortunately this is necessary, since always at least one backup remains on the disks. We change the hard disks every day. Is the procedure so ok?
- Anmelden, um Kommentare verfassen zu können

Glad to hear that :) If you want only one backup to be stored on each drive, then you may want using the script listed in Backing Up to Removable Devices with Regular Drive Swaps.
- Anmelden, um Kommentare verfassen zu können

Great. I have another question. All backup files are always _.tibx. Its the normal? The file name of the backup should be: [MachineName]-backup
- Anmelden, um Kommentare verfassen zu können

Hi,
Sorry for delayed response! I believe you've selected a managed location for backups. The above naming is expected for a managed location. Backup archives in an unmanaged location will be named like in the examples of Backup file name.
- Anmelden, um Kommentare verfassen zu können