> ## Documentation Index
> Fetch the complete documentation index at: https://filla.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Attachment Renamer

> Rename files in Airtable attachment fields using dynamic templates with record field values.

## What this tool does

The Attachment Renamer renames files in an Airtable attachment field based on a template you define. Templates can include field values from the record and special tokens for the original filename, extension, and position.

Use it to standardize file naming conventions across your records, for example naming every invoice file `INV-001_Acme-Corp_2026-01.pdf`.

## Settings reference

### Source

| Setting              | Description                                                                             |
| -------------------- | --------------------------------------------------------------------------------------- |
| **Source table**     | The table containing file attachments.                                                  |
| **Attachment field** | The attachment field with files to rename.                                              |
| **Rename template**  | The naming template. Type `@` to insert field values, and use tokens for file metadata. |

### Options

| Setting                     | Description                                                                       |
| --------------------------- | --------------------------------------------------------------------------------- |
| **Preserve file extension** | Automatically append the original file extension if not included in the template. |
| **Skip empty fields**       | Skip records that have no attachments.                                            |

## Template reference

Use these tokens in your rename template:

| Token           | What it inserts                                    |
| --------------- | -------------------------------------------------- |
| `@{Field Name}` | The value of any Airtable field on the record      |
| `{filename}`    | The original filename without extension            |
| `{ext}`         | The original file extension (without the dot)      |
| `{index}`       | The attachment's position in the field (0-indexed) |
| `{count}`       | Total number of attachments in the field           |

## Example templates

**Invoice naming pattern:**

```
INV-@{Invoice Number}_@{Client Name}.{ext}
```

Output: `INV-042_Acme-Corp.pdf`

**Asset library naming:**

```
@{Category}_{filename}_{index}.{ext}
```

Output: `Marketing_banner_0.png`, `Marketing_banner_1.png`

**Date-prefixed files:**

```
@{Date}_@{Record Name}.{ext}
```

Output: `2026-01-15_Project-Alpha-Brief.docx`

## Preview

The Attachment Renamer has a preview panel that shows the current filename and the proposed new name for a sample of your records. Review the preview before running.

## Common questions

<AccordionGroup>
  <Accordion title="Does renaming change the file content?">
    No. Only the filename changes. The file content, format, and Airtable attachment URL are updated to reflect the new name, but the binary content is untouched.
  </Accordion>

  <Accordion title="What if two attachments get the same name?">
    If two attachments in the same record would get the same name, use the `{index}` token to differentiate them.
  </Accordion>

  <Accordion title="What characters are allowed in filenames?">
    The generated filename is sanitized to allow alphanumeric characters, underscores, dots, and hyphens. Special characters from field values are replaced or removed.
  </Accordion>
</AccordionGroup>
