@echo off

:: make settings directory to save settings files to
MKDIR "%~dp0Settings"

:: copy settings files to settings directory
COPY "%USERPROFILE%\Local Settings\Application Data\OcenAudio\*.*" "%~dp0Settings"

:: remove settings directory on local machine used by the portable application
RMDIR /S /Q "%USERPROFILE%\Local Settings\Application Data\OcenAudio"

:: restore local settings directory
MOVE "%USERPROFILE%\Local Settings\Application Data\OcenAudio_backup" "%USERPROFILE%\Local Settings\Application Data\OcenAudio"