Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Description = this batch file moves files outlined in article #61763
- :: post moving the files it STARTs the DentrixACEServer
- ::
- :: How to use:
- :: Run from the Server and input the Drive Letter in which the DB or Database
- :: resides
- ::
- :: More Information:
- :: 9.a If the office is on G5 PP1 Update 3 (15.2.170.0) or higher:
- :: 1. Stop the Dentrix Ace Service.
- :: 2. Rename the FAIRCOM.FCS file located in the [DriveLetter]:DENTRIXDB folder.
- :: 3. Copy the FAIRCOM.FCS from the DBCopyForBackup to the DB folder.
- :: 4. Start the Dentrix Ace Service.
- ::
- :: Date Author Change/Update
- :: 01-DEC-2014 PHavens 20-DEC-2014
- @TITLE Automate the Process Outlined in Article 9a #61763 by Paul Havens
- @ECHO OFF
- SET tdtd=none
- FOR /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j
- FOR /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k
- SET DateBack=%tdtd%
- :Version
- CLS
- NET START DentrixACEServer
- CLS
- NET STOP DentrixACEServer
- CLS
- @ECHO OFF
- FOR /F "Tokens=3*" %%a in ('REG QUERY "HKEY_CURRENT_USERSOFTWAREDentrix Dental Systems, Inc.DentrixGeneral" /v COMMONPATH')DO SET xPath=%%a %%b
- ECHO %xPath%
- ECHO.
- @ECHO OFF
- SET /P Response="Input the Drive Letter above only or q to quit >
- IF "%Response%"=="q" GOTO EOF ELSE GOTO TooLong
- IF "%Response%"=="MkDbCopy" GOTO Backup ELSE GOTO TooLong
- IF "%Response%"=="" GOTO Blank ELSE GOTO TooLong
- IF NOT EXIST "%Response%:DentrixDB" GOTO TooLong ELSE GOTO Relevent
- SET "DEST_DIR=%Response%:DentrixDB"
- IF NOT EXIST "%Response%:DentrixCommonDBCopyForBackup" GOTO Backup ELSE GOTO Relevent
- IF NOT EXIST "%Response%:DentrixCommonDBCopyForBackupFaircom.FCS" GOTO Backup ELSE GOTO Relevent
- :Relevent
- ::COPY %Response%:DentrixCommonDBCopyForBackup %tdtd%DBCopyForBackup
- ::%Response%:DentrixCommonDBCopyForBackup %tdtd%DBCopyForBackup
- RENAME %Response%:DentrixDBFaircom.FCS %tdtd%Faircom.FCS
- SET "SOURCE_DIR=%Response%:DentrixCommonDBCopyForBackup"
- SET "FILES_TO_MOVE=Faircom.FCS"
- pushd "%SOURCE_DIR%"
- FOR %%F IN (%FILES_TO_MOVE%) do (
- ECHO file "%%F"
- copy /Y "%%F" "%DEST_DIR%"
- )
- CLS
- NET START DentrixACEServer
- CLS
- ECHO Successfully replaced the Faircom.FCS file.
- PAUSE
- EXIT
- :EOF
- EXIT
- :Irrelevent
- CLS
- @ECHO ON
- @ECHO If this is version 15.1.312.0 and lower there will not be a Faircom.FCS file and you do not need to follow 61763 9a, or you may need to re-export if the version is >15.1.312.0.
- @ECHO Then re-type the drive letter.
- PAUSE
- EXIT
- :Backup
- @ECHO There was not a valid DBCopyForBackup Folder, this will now create the folder and re-run with the drive letter, thank you.
- NET START DentrixACEServer
- START /d "%Response%:DentrixServer FilesDentrix_Tools" MkDbCopy.exe
- PAUSE
- NET STOP DentrixACEServer
- CLS
- GOTO Version
- :Blank
- @ECHO No Drive letter was inputted, try again.
- PAUSE
- CLS
- GOTO Version
- :TooLong
- @ECHO Input the correct drive letter, try again.
- PAUSE
- CLS
- GOTO Version
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement