SHARE
TWEET

бэкап файловой БД 1С

Danila_Spevak Sep 5th, 2014 (edited) 255 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. set BasePath=C:\Users\Danila\Documents\Money\
  3. set v8exe="C:\Program Files (x86)\1cv8\common\1cestart.exe"
  4. set DumpPath=Z:\backup\1C_Money\
  5.  
  6. set connect_str="File=""%BasePath%"";"
  7. set connect_name="Данила"
  8. set connect_pwd=""
  9.  
  10. rem Skip incorrectness in time earlier than 10:00 - replace of leading whitespaces with '0'
  11. set now=%DATE: =0% %TIME: =0%
  12.  
  13. rem Disassemble date and time on parts
  14. for /f "tokens=1-7 delims=/-:., " %%a in ( "%now%" ) do (
  15.     rem Define your owned delimiters and order of tokens
  16.     set now=%%c.%%b.%%a_%%d-%%e
  17. )
  18. set dump_file="%DumpPath%1C_MONEY_%now%.dt"
  19.  
  20. set timeout=300
  21.  
  22. :startbackup
  23.     if EXIST %BasePath%1Cv8.1CL (
  24.         timeout /t %timeout% /NOBREAK
  25.         goto startbackup
  26.     )
  27. %v8exe% DESIGNER /IBConnectionString%connect_str% /N%connect_name% /P%connect_pwd% /WA- /DumpIB%dump_file%
  28.      
  29. for /f "skip=3 delims=" %%i in ('dir "%DumpPath%*.dt" /b /a:-d /o-d') do del /f /q "%DumpPath%%%i"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top