> For the complete documentation index, see [llms.txt](https://docs.viesus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viesus.com/tools/folder-enhancer.md).

# Folder Enhancer

The VIESUS Folder Enhancer is a Windows desktop application that watches hotfolders and automatically enhances images and PDFs as they arrive — no command line required.

The VIESUS Folder Enhancer is a Windows GUI application built on top of the Image Enhancement CLI and the PDF Enhancer CLI. It watches one or more **hotfolders** — when a file lands in a watched folder, the Folder Enhancer automatically enhances it and writes the result to a configured destination folder.

Because it drives both underlying CLIs, the Folder Enhancer handles both **images** (JPEG, TIFF, PNG, …) and **PDF documents** with embedded images.

<figure><img src="https://919968377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG3eQlcnlDKtn9yl3mxsx%2Fuploads%2Fgit-blob-9ea694362432156ca215e4df59c6920c19502181%2Ffolder_enhancer_new%20(1).png?alt=media" alt="VIESUS Folder Enhancer main window showing configured hotfolders and the operation log"><figcaption><p>The main window lists each configured hotfolder and shows live processing status in the operation log.</p></figcaption></figure>

***

## How hotfolders work

Each hotfolder is an independent processing channel with its own configuration:

| Setting                    | Description                                                              |
| -------------------------- | ------------------------------------------------------------------------ |
| **Source folder**          | The folder to watch for incoming files                                   |
| **Destination folder**     | Where enhanced output files are written                                  |
| **Enhancement parameters** | A `viesusini.json` configuration applied to every file in this hotfolder |
| **Input**                  | Images or PDF, one type per hotfolder                                    |
| **Unsupported**            | Move, delete or keep files of other types                                |

Click **New** to create a hotfolder, or edit an existing one from the list. Both open the hotfolder dialog, where you set the source and destination folders, the `viesusini.json` settings file, the input type (images or PDF), and options such as trigger files, batch size, and how to handle unsupported files.

<figure><img src="https://919968377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG3eQlcnlDKtn9yl3mxsx%2Fuploads%2Fgit-blob-999afae6829614d7bdacc3187e1ccbd80977dce1%2Ffolder_enhancer_new_dialog.png?alt=media" alt="Hotfolder dialog showing source, destination, and data settings" width="563"><figcaption><p>The hotfolder dialog — source, destination, and the per-hotfolder settings file and input type.</p></figcaption></figure>

You can define as many hotfolders as needed — for example one tuned for portrait photos, another for product images, and a third for PDF documents, all running simultaneously with different parameters.

When a file appears in a source folder, the Folder Enhancer:

1. Detects the new file or folder
2. Applies the enhancement settings configured for that hotfolder
3. Writes the enhanced result to the destination folder
4. Removes the source once the result has been written

***

## Single files and folders

A hotfolder accepts both loose files and complete folders.

**Single files** dropped into the source folder are enhanced one by one. A file is picked up once it has been unchanged for the configured **Delay** and is no longer being written. The enhanced file goes to the destination folder and the source file is removed.

**Folders** placed in the source folder are processed as one job. The folder structure is recreated in the destination, every supported file inside is enhanced, other files are copied unchanged, and the source folder is removed once all files are done. A folder is only picked up if the hotfolder has a **Triggerfile** or a **Busy marker** set. Without either, folders are ignored.

### Source settings

| Setting         | What it does                                                                                                                                                                                                                                                                          |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Triggerfile** | Name of a file that marks a folder as complete, for example `order.ready`. The folder is processed only when this file exists inside it, so write it last. When processing is done, the trigger file is moved to the output folder.                                                   |
| **Busy marker** | Prefix or suffix that marks a folder as still being written, with `*` standing for the folder name: `busy_*` or `*_busy`. Folders whose name carries the marker are left alone, every other folder is processed. Copy as `busy_order1`, rename to `order1` when the copy is complete. |
| **Delay (s)**   | Seconds an item must be unchanged before it is picked up. Applies to single files, to the trigger file, and to the folder itself.                                                                                                                                                     |

### Destination settings

| Setting         | What it does                                                                                                                                                                               |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Triggerfile** | Name of an empty file created in each output folder once it is complete, for the next step in your workflow. Defaults to `viesus.ready` when no destination busy marker is set.            |
| **Busy marker** | Prefix or suffix added to the output folder while it is being processed, for example `busy_*`. The folder is renamed to its original name when done. PDF hotfolders support a prefix only. |
| **Overwrite**   | Replace existing files and folders of the same name in the destination.                                                                                                                    |

### Folders without a trigger file

If the system feeding the hotfolder can neither write a trigger file nor rename folders, set a **Busy marker** that no folder will ever carry, for example `busy_*`, and leave **Triggerfile** empty. Every folder is then eligible, and the **Delay** acts as an inactivity timeout: each file created directly in the folder restarts the clock, and the folder is processed once it has been untouched for the delay.

**Example:** Delay is 30. Files arrive every few seconds, the copy pauses for 20 seconds, then more files arrive. The folder keeps waiting. Once nothing has been added for 30 seconds, the folder is processed on the next check.

This works for flat folders with short gaps. Three limits apply:

* Only files created directly in the folder restart the clock. Files written into a subfolder do not.
* Writing into a file does not restart the clock. A single file that takes longer than the delay to copy is picked up before it is complete. Unlike loose files, which wait while they are still open for writing, files inside a folder are not checked. A file still being written when the folder is picked up fails, and the folder is left half-processed until the Folder Enhancer is restarted.
* Folders are checked every 5 seconds, so the wait is the delay plus up to one check.

Choose a delay longer than the longest pause between two files and longer than the slowest single file copy.

{% hint style="warning" %}
Files that arrive after the folder has been picked up are not part of the job and are deleted together with the source folder. Nested folders and large files copied over the network will run into this sooner or later. A trigger file written last, or moving folders into the hotfolder instead of copying them, avoids it.
{% endhint %}

***

## When to use the Folder Enhancer

| Scenario                                                    | Use                                                                                                                   |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Automated enhancement without scripting or code             | ✓                                                                                                                     |
| Different enhancement settings per file type or source      | ✓                                                                                                                     |
| Integrating VIESUS into a Windows-based production workflow | ✓                                                                                                                     |
| Processing both images and PDFs from the same tool          | ✓                                                                                                                     |
| Linux deployments or scripted pipelines                     | No — use the [CLI](/reference/cli-reference.md) directly                                                              |
| Request-response or API-driven workflows                    | No — use the [Node.js module](/reference/node.js-module/overview.md) or [Cloud API](/reference/cloud-api/overview.md) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.viesus.com/tools/folder-enhancer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
