OS4X Directory Scanner
(incomplete / come back later for a final version)
What is the OS4X Directory Scanner?
The goal of the directory scanner is to scan configured directories (without recursion) for new files (older than 60 seconds) and apply a matching pattern on them. If the pattern matches, the file will be moved to the configured outgoing directory and an executable will be started with parameters defined for this directory scanner entry, based on either fix values or dynamic ones.
The OS4X Directory Scanner is available since OS4X 3 in OS4X 3 Core.
Configuration of scanning tasks
Using the directory scanner needs some configuration via web interface and optionally in addition on the filesystem (if you really want to modify the behaviour more deeply).
Menu entry
The menu entry "Dir.scanner" in the administrative web interface exists if the binary
os4x_ds_dryrun
exists in the installation directory for binaries of OS4X.
Clicking on that links shows you the actually configured directory scanner entries, with an empty view in the default installation.
You can click on "New" or the empty paper icon to create a new entry. In order to edit an entry, click on the edit icon.
The following screenshot shows the edit page of an existing directory scanner entry:
Name
The name of the directory scanner entry can be a human-interpretable textual string which will only occur in the logs.
Directory
The directory on which the directory scanner works on. Remember that only that directory without subdirectories will be scanned. The configured outgoing directory cannot be configured since the files will be moved into that directory before executing the command for a found file.
Regular expression
The file name found in the configured directory must match this [expression]. Regular expressions are quite complex but very powerful. The name of the found file must result into a true value (which means that any output of the regular expression is valid but not the empty). If the regular expression is not correct, the directory scanner will identify this situation, add a log entry to the system log and disable this configured directory scanner configuration.
Configuration values
fix values
variable values
Execution
Sorting order
Enable / disable entry
Preview / Dry-run
Delete entry
Logging
Logging will be done in general for the following items:
- a regular expression is not valid
- a directory is not accessable
- a file which should be moved by the directory scanner is not movable (which includes a inner-filesystem and outer-filesystem file movement)