Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script to remove EMA Config files - Avaya Contact Recorder v15.x
: *****************************************************************
: SCRIPT TO REMOVE EMA CONFIG FILES - Avaya Contact Recorder v15.x
: Ref: Avaya Contact Recorder Integration to Workforce Optimization Guide Version 15.2
: Topology Changes, Page 38
: *****************************************************************
: by Mark@????
@echo off
: ------------
: Generate Timestamp
: ------------
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
set "fullstamp=%YYYY%%MM%%DD%__%HH%-%Min%-%Sec%"
echo datestamp: "%datestamp%"
echo timestamp: "%timestamp%"
echo fullstamp: "%fullstamp%"
: ------------
: VARIABLES
: ------------
set EMA_CONF_ROLES_PATH=E:\Avaya\ACR152\ema\Conf\Roles
set EMA_CONF_CACHE_PATH-E:\Avaya\ACR152\ema\Conf\Cache
set BACKUP_LOCATION=%USERPROFILE%\Desktop
set BASE_FOLDER_NAME=EMACONF__%COMPUTERNAME%__%fullstamp%
@echo on
cd /d %BACKUP_LOCATION%
md %BASE_FOLDER_NAME%
: ------------
: Roles Folder
: ------------
md %BASE_FOLDER_NAME%\Roles
cd /d %BASE_FOLDER_NAME%\Roles
xcopy %EMA_CONF_ROLES_PATH% . /E /H /R /X /Y /I /K
timeout 15
rmdir %EMA_CONF_ROLES_PATH% /S /Q
md %EMA_CONF_ROLES_PATH%
: ------------
: Cache Folder
: ------------
cd /d %BACKUP_LOCATION%
md %BASE_FOLDER_NAME%\Cache
cd /d %BASE_FOLDER_NAME%\Cache
xcopy %EMA_CONF_CACHE_PATH%\*.xml . /E /H /R /X /Y /I /K
xcopy %EMA_CONF_CACHE_PATH%\*.bak . /E /H /R /X /Y /I /K
timeout 15
del %EMA_CONF_CACHE_PATH%\*.xml /s /q
del %EMA_CONF_CACHE_PATH%\*.bak /s /q
explorer %BASE_FOLDER_NAME%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.