diff --git a/1cibases.cmd b/1cibases.cmd new file mode 100644 index 0000000..4bdd636 --- /dev/null +++ b/1cibases.cmd @@ -0,0 +1,49 @@ +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