> For the complete documentation index, see [llms.txt](https://twist-1.gitbook.io/hammer5tools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://twist-1.gitbook.io/hammer5tools/tools/publish-your-docs/process.md).

# Process

## Overview

<figure><img src="https://1853659043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOaVzlMa1Hn8OxqfYLKn%2Fuploads%2FWDjMbmG9WWlO1zx33iwZ%2Fimage.png?alt=media&amp;token=34c3a53f-383c-4c8e-af50-4cf345856188" alt=""><figcaption></figcaption></figure>

Clicking the **Process Action** button processes each file listed on the left as input and generates the corresponding output shown on the right. The output file extension is set in the **Process** section of the **Explorer** tab.

When you run the process, the program applies the specified replacements and creates new files with the selected output extension.

## Options

### Files selection

Root Directory Exampl&#x65;**:**

* `test_folder` (directory)
* `test_folder.hbat` (configuration file)

By default, the program processes all files in the directory where the configuration file is located (e.g., `test_folder`) and matches the name of the configuration file (e.g., `test_folder.hbat`).

If you want to specify a custom set of files, uncheck the **Load from folder** option and click **Select files to process**.

In addition to this output, the program will also generate files in the same folder by default. To change this, uncheck the **Output to folder** option and click **Choose output** to select a different location.

You can also paste file paths directly from the clipboard. This is useful for copying asset paths from the Hammer Editor.

| Input exampp                                                                              |
| ----------------------------------------------------------------------------------------- |
| *models/props/de\_train/hr\_train\_s2/train\_hvac/train\_hvac\_vent\_32\_square\_01.vmdl* |
| *models/props/de\_train/hr\_train\_s2/train\_hvac/train\_hvac\_vent\_32\_square\_02.vmdl* |
| *models/props/de\_train/hr\_train\_s2/train\_ladders/train\_heaven\_ladder\_01.vmdl*      |

Each item added through pasting or the selection dialog can be deleted. Right-click to open the context menu.

### Algoritmes

There are two algorithms for file processing: **"Process without interpretation"** and **"Remove underscore from the end"**. Each is suited for different circumstances:

1. **Process without interpretation**\
   This algorithm is typically used for models and modular trims. It generates a new output file for each input file. For example:

   * Input: `model_64_a.fbx` and `model_128.fbx`
   * Output: `model_64_a.vmdl` and `model_128.vmdl`

   This approach is ideal when multiple separate files are required.
2. **Remove underscore from the end**\
   This algorithm is used for textures or similar grouped files, where multiple input files should result in a single output file. For example:

   * Input: `texture_a_R.tga` and `texture_a_A.tga`
   * Output: `texture_a.vmat`

   In this case, using the first algorithm would mistakenly generate two separate files instead of one material file.

<table><thead><tr><th width="181">Input</th><th>Process without interpretation</th><th>Remove underscore from the end</th></tr></thead><tbody><tr><td>model_64_a.fbx</td><td><mark style="background-color:green;">model_64_a.vmdl</mark></td><td><mark style="background-color:red;">model_64</mark></td></tr><tr><td>model_128.fbx</td><td><mark style="background-color:green;">model_128.vmdl</mark></td><td><mark style="background-color:red;">model</mark></td></tr><tr><td>texture_a_R.tga</td><td><mark style="background-color:red;">texture_a_R.vmat</mark></td><td><mark style="background-color:green;">texture_a.vmat (one file)</mark></td></tr><tr><td>texture_a_A.tga</td><td><mark style="background-color:red;">texture_a_A.vmat</mark></td><td><mark style="background-color:green;">texture_a.vmat (one file)</mark></td></tr></tbody></table>

{% hint style="info" %}
**Note:** The file extensions (`.tga`, `.fbx`, `.vmdl`, `.vmat`) are just examples; the algorithms work with various file types
{% endhint %}

### Ignorelist

Use the **Ignore** button in the input file selection to exclude specific files. To remove files from the ignore list, erase the file names or extensions from the **Ignore** text field.

To add extensions to the ignore list, type them in the field, separated by a comma and a space (e.g., `blend, sbr`).
