CopiaFacts Housekeeping Service

net start|stop CFHKSERVICE

This service application maintains, and performs, CopiaFacts housekeeping tasks for archiving and deletion of time-expired files.  It is set up and configured using the CFHK program:

The program manages the settings for the CopiaFacts Housekeeping Service CFHKSERVICE, which performs regular archiving and file deletion functions in the background.

Three modes of operation

The management program CFHK operates in three different ways, distinguished by different background colors:

Program Name:

Runs on:

Configures Windows Service:

Parameters Database:

Typical housekeeping:


Copia Fileserver

On FileServer


System temp files and older files


Other Network Machines

On Local Machine

Windows APPDATA\

Local temp files and older files (e.g. SMTP Gateway)


Administrator's Machine

On File Server


System temp files and older files

Take great care if you use CFHK on a machine other than the file server (it will set a red background color).  You are configuring paths as viewed by the Windows service running on the FileServer, not on your own machine.

System Housekeeping

The CopiaFacts Server Installer only installs the CFHKSERVICE when it the installer is run on the same machine as the COPIA share.  The sample database of housekeeping tasks (CFHK.DB) is also installed in the COPIA\FAXFACTS folder if this file is not already present.  When the CFHKSERVICE service runs on the same machine as the COPIA share, it always uses COPIA\FAXFACTS\CFHK.DB as its repository of tasks.

The CFHK program can be run on any machine connected to the COPIA share on which the server installer has been run, and manages the central database of tasks.  However when you run it on a machine other than the file server you cannot preview or run an action unless all its paths contain a reference to @FFBASE or one or the other main folder variables.

When you manage tasks with CFHK, it always uses the main CFHK.DB and path names in this file should be local to the machine on which the COPIA share resides.
We recommend always using absolute paths, starting @FFBASE or one of the other main folder variables.  However if you use a relative path, it will be based on the @FFFBASE folder.

Local Housekeeping

Administrators of larger systems may wish to run housekeeping tasks on local folders on other machines, such as those on a machine running the Copia SMTP Gateway.  This can be set up manually as follows:

Copy the CFHK.exe program (in the local Program Files\Copia folder) to CFHKLOCAL.exe.  When run as CFHKLOCAL, the program will operate with a local CFHKLOCAL.db database, and will prompt to create an empty database if there is not one already.  The database is located in the Windows All Users APPDATA folder, under COPIA\CFHK.

Install the service application from the local Program Files\Copia folder by running it as administrator with the /INSTALL parameter:

      CFHKSERVICE /install

The service will be set to start automatically.  Start it manually the first time with NET START CFHKSERVICE.

When the service runs on a different machine to that of the COPIA share, it always uses COPIA\CFHKLOCAL.DB under All Users APPDATA as its repository of tasks.

You can also install the service using CFHKSERVICE /uninstall

The heading line in the CFHKLOCAL window substitutes 'Local' for 'System' to indicate that the local database is in use, and the background color changes to yellow (except on some early versions of Windows).

Housekeeping Actions

Three 'action' types are currently supported: simple deletion, archive ('Zip and delete'), and 'UJArchive'.  The last corresponds to the old UJARCHIVE program and implements the archiving and deletion specified on the Client Administrator 'Archiving and Deletion' tab.  ZIP files created by CFHKSERVICE have a filename based on the time at which the file was created.

In the Wildcard Paths edit box, Windows wildcards (* and ?) are permitted in any folder, but not in the machine or share name. Do not use mapped drive letters in the paths to be used by this program.  Mapped drives are usually not visible when the service application actually runs the processing.

       Trace Information   In case of problems, the program can write trace information by adding CFHKSERVICE in FFTRACE under File/Applications.  To enable tracing on Vista and later, run FFTRACE as administrator, and enable CFHKSERVICE in File/Applications.  A file named CFHKSERVICE.FTx will be written in your normal trace folder defined by FFTRC.  FFTRACE does not need to be running in this case.