When you schedule a report delivery for set of reports in a folder, Veeam ONE Reporter saves the reports to a target location by the following path:
<TargetDirectory>\reporting-task-for-folder-<FolderName><ID>\
The sample script must perform the following operations:
- Access the target report location:
C:\reports\reporting-task-for-folder-<FolderName><ID>\
- For every generated report, retrieve the report name and copy the report to a folder with the report name:
C:\share\myreports\%ReportName%\
To create a folder with the report name, the script will use the %ReportName% parameter.
- Remove the reports from the target location and delete the target directory.
An example of the script is provided below:
::Changing directory to the target report location |
Save the script as a Windows batch file on the machine where Veeam ONE is installed.
To follow this example, save the script with the postdelivery.bat name to the C:\reports\ directory.