-
Notifications
You must be signed in to change notification settings - Fork 5
/
convert.bat
60 lines (40 loc) · 1.25 KB
/
convert.bat
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
set bin="F:\Program Files (x86)\1cv8\8.3.9.1818\bin\1cv8.exe" DESIGNER /IBName "Srvr=""srv1c_dev:3541"";Ref=""alfa_dev_klimenko"";" /NКлименко /Psecret /ConfigurationRepositoryF "W:\STORAGE_1C\ALFA" /ConfigurationRepositoryN "Клименко" /ConfigurationRepositoryP ""
set src=Z:\Users\klimenko\Documents\Миграция
set log=Z:\Users\klimenko\Documents\log.log
set log_log=Z:\Users\klimenko\Documents\loglog.log
set dst=%src%_XML
set dst_epf=%dst%\DataProcessors
set dst_erf=%dst%\Reports
del "%log_log%"
mkdir "%dst%"
mkdir "%dst_epf%"
for %%i in ("%src%\*.epf") do (
mkdir "%dst_epf%\%%~ni"
%bin% /DumpExternalDataProcessorOrReportToFiles "%dst_epf%\%%~ni" %%~fi /Out"%log%"
:wait1
if not exist log.log goto wait1
type log.log
type log.log >> loglog.log
del log.log
)
mkdir "%dst_erf%"
for %%j in ("%src%\*.erf") do (
mkdir "%dst_erf%\%%~nj"
%bin% /DumpExternalDataProcessorOrReportToFiles "%dst_erf%\%%~nj" %%~fj /Out"%log%"
:wait2
if not exist log.log goto wait2
type "%log%"
type "%log%" >> "%log_log%"
del "%log%"
)
for /D %%t in (%dst%\*) do (
for /D %%d in ("%%~t\*") do (
for %%x in ("%%d\*.xml") do (
move /Y "%%~fx" "%%~dpd%%~nd.xml"
move /Y "%%~dpx%%~nx" "%%~dpd"
rmdir /s /q "%%d"
move /Y "%%~dpd%%~nx" "%%~dpd%%~nd"
)
)
)