Pre- and Post-Processing (Prepost) |
Pre- and post-processing script examples.
In Windows batch, call the Email notification function only on files that are destined for a specific host 10.0.114.111:
set DESTINATION=10.0.114.111 if "%TYPE%" == "Session" ( if "%STARTSTOP%"=="Stop" ( if "%PEER%" == "%DESTINATION%" ( "C:\Perl\bin\perl.exe" aspera-notif.pl > nul 2>&1 ) ) )
In Windows batch, call the Email Notification only when the files are larger than 1GB (1073741824 bytes):
set FILESIZE=1073741824 if "%TYPE%" == "Session" ( if "%STARTSTOP%"=="Stop" ( if %TOTALSIZE% GEQ %FILESIZE% ( "C:\Perl\bin\perl.exe" aspera-notif.pl > nul 2>&1 ) ) )
In Windows batch, call the Email notification function on files that are latger than 1GB (1073741824 bytes), and destined for a specific host 10.0.114.111:
set FILESIZE=1073741824 set DESTINATION=10.0.114.111 if "%TYPE%" == "Session" ( if "%STARTSTOP%"=="Stop" ( if %TOTALSIZE% GEQ %FILESIZE% ( if "%PEER%" == "%DESTINATION%" ( "C:\Perl\bin\perl.exe" aspera-notif.pl > nul 2>&1 ) ) ) )