50 lines
1.1 KiB
Batchfile
50 lines
1.1 KiB
Batchfile
|
pushd "%~dp0"
|
||
|
@echo off
|
||
|
goto :Start
|
||
|
|
||
|
--------------------------------------------------
|
||
|
1CEStart backup/restore settings
|
||
|
|
||
|
Positional parameters:
|
||
|
[1] qn - execution without pauses
|
||
|
[2] b - backup
|
||
|
r - restore
|
||
|
|
||
|
Administrator rights are not required
|
||
|
--------------------------------------------------
|
||
|
|
||
|
:Start
|
||
|
set workingdir="%USERPROFILE%\AppData\Roaming\1C\1CEStart"
|
||
|
set archivedir="D:\settings"
|
||
|
set choice=%~2
|
||
|
|
||
|
:Set_Choice
|
||
|
cls
|
||
|
if "%choice%" EQU "b" (
|
||
|
goto :Get_backup
|
||
|
)
|
||
|
if "%choice%" EQU "r" (
|
||
|
goto :Get_restore
|
||
|
)
|
||
|
echo backup: from %workingdir% to %archivedir%
|
||
|
echo restore: from %archivedir% to %workingdir%
|
||
|
set /p choice= Do you want backup(b) or restore(r) settings? [b or r]:
|
||
|
goto :Set_Choice
|
||
|
|
||
|
:Get_backup
|
||
|
echo backup settings...
|
||
|
set filenameis="ibases.v8i"
|
||
|
echo F|xcopy /I /H /Y /C /R /S %workingdir%\%filenameis% %archivedir%\%filenameis% >NUL
|
||
|
goto :Exit
|
||
|
|
||
|
:Get_restore
|
||
|
echo restore settings...
|
||
|
set filenameis="ibases.v8i"
|
||
|
echo F|xcopy /I /H /Y /C /R /S %archivedir%\%filenameis% %workingdir%\%filenameis% >NUL
|
||
|
goto :Exit
|
||
|
|
||
|
:Exit
|
||
|
if "%~1" NEQ "qn" pause
|
||
|
popd
|
||
|
exit
|