@echo off

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

:: copy settings files to settings directory
XCOPY "%APPDATA%\WinLess\*.*" "%~dp0Settings" /S /E /Y

:: remove settings directory on local machine used by the portable application
RMDIR /S /Q "%APPDATA%\WinLess"

:: restore local settings directory
MOVE "%APPDATA%\WinLess_backup" "%APPDATA%\WinLess"