Skip to main content

FcAdminTools command line compact, backup and zip to archive

The following is an example Windows batch file for automating the following actions on an ABBYY FlexiCapture project:

  • Compact all projects on the server
  • Download all projects to a local pathA rem'd section details how to download only a specific project
  • Zip the downloaded project(s) into a folder based on today's date, remove files after zipping

Usage example:​

@echo off

set server=http://localhost/ set today=%date:/=% rem Possible values are All, LayoutOnly, ClassifierOnly, None set copyTrainingBatches=All

rem Possible values are [blank] or /CopyTrainingSamples set copyTrainingSamples=/CopyTrainingSamples

set backupPath=d:\wfd\developer\backups%today% mkdir "%backupPath%"

set exePath="C:\Program Files\ABBYY FlexiCapture 12 Stations\fcadmintools.exe"

rem Compact all projects first (removes unused docdef, etc) echo Compacting %exePath% CompactProject /Server="%server%" > "%backupPath%\Log-compact.txt"

rem Download all projects (one folder for each) echo Downloading to %backupPath%

rem Specific project (example ID:1, project folder: projectX) rem mkdir "%backupPath%\projectX" rem %exePath% DownloadProject /Project="%server%/1/" /Target="%backupPath%\projectX" /CopyTrainingBatches="%copyTrainingBatches%" %copyTrainingSamples% > "%backupPath%\projectX\Log-download.txt"

rem All projects %exePath% DownloadProject /Server="%server%" /Target="%backupPath%" /CopyTrainingBatches="%copyTrainingBatches%" %copyTrainingSamples% > "%backupPath%\Log-download.txt"

rem Zip the backup echo Zipping %backupPath% "C:\Program Files\7-Zip\7z.exe" a -r -sdel "%today%" "%backupPath%*" rmdir "%backupPath%" echo Zipped

:end echo Complete