forked from arkuznetsov/1CFilesConverter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathib2cf.cmd
43 lines (36 loc) · 1.31 KB
/
ib2cf.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@ECHO OFF
rem Save 1C configuration from 1C infobase (file) to 1C configuration file (*.cf)
rem %1 - path to folder contains 1C infobase
rem %2 - path to 1C configuration file (*.cf)
rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set IB_PATH=%1
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONFIG_FILE=%2
if defined CONFIG_FILE (
set CONFIG_FILE=%CONFIG_FILE:"=%
set CONFIG_FILE_PATH=%~dp2
)
set CONV_TOOL=%3
if defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
if not defined IB_PATH (
echo Missed parameter 1 "path to folder contains 1C infobase"
exit /b 1
)
if not defined CONFIG_FILE (
echo Missed parameter 2 "path to 1C configuration file (*.cf)"
exit /b 1
)
md "%CONFIG_FILE_PATH%"
echo Export infobase "%IB_PATH%" configuration to "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %CONFIG_FILE%
) else (
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" "%CONFIG_FILE%"
)