Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set BasePath=C:\Users\Danila\Documents\Money\
- set v8exe="C:\Program Files (x86)\1cv8\common\1cestart.exe"
- set DumpPath=Z:\backup\1C_Money\
- set connect_str="File=""%BasePath%"";"
- set connect_name="Данила"
- set connect_pwd=""
- rem Skip incorrectness in time earlier than 10:00 - replace of leading whitespaces with '0'
- set now=%DATE: =0% %TIME: =0%
- rem Disassemble date and time on parts
- for /f "tokens=1-7 delims=/-:., " %%a in ( "%now%" ) do (
- rem Define your owned delimiters and order of tokens
- set now=%%c.%%b.%%a_%%d-%%e
- )
- set dump_file="%DumpPath%1C_MONEY_%now%.dt"
- set timeout=300
- :startbackup
- if EXIST %BasePath%1Cv8.1CL (
- timeout /t %timeout% /NOBREAK
- goto startbackup
- )
- %v8exe% DESIGNER /IBConnectionString%connect_str% /N%connect_name% /P%connect_pwd% /WA- /DumpIB%dump_file%
- for /f "skip=3 delims=" %%i in ('dir "%DumpPath%*.dt" /b /a:-d /o-d') do del /f /q "%DumpPath%%%i"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement