# Format Patterns & EXIF

Create custom filename patterns using AI-generated names, file dates, EXIF metadata fields, and text transformations in RenameClick.

RenameClick offers powerful filename formatting through built-in presets and custom patterns. You can combine AI-generated names with file dates, EXIF metadata, and text transformations.

## Built-in Format Presets

| Preset                 | Example Output                          | Description                            |
|-----------------------|----------------------------------------|----------------------------------------|
| **Spaces**            | `Modern Office Desk.jpg`               | AI name as-is with spaces              |
| **Slug Case**         | `modern-office-desk.jpg`               | Lowercase with hyphens                 |
| **Camel Case**        | `modernOfficeDesk.jpg`                 | camelCase format                        |
| **[exif] When_Where**| `2024-12-07_Berlin_Modern Office Desk.jpg` | EXIF date + location + AI name        |

## Custom Format Presets

You can create your own named format presets with custom patterns. Each preset stores a name, format pattern (using placeholders below), and optional description.

When you create a new format preset:
- The pattern editor validates syntax before saving
- A live preview shows what the output will look like
- The new preset is auto-selected immediately

## Placeholders Reference

### AI Name Placeholders

| Placeholder  | What It Returns                        | Example                  |
|--------------|---------------------------------------|--------------------------|
| `$1`        | Full AI-generated name                | "Modern Office Desk"    |
| `$2`        | First word of AI name                 | "Modern"                |
| `$3`        | Second word                          | "Office"                |
| `$4`        | Third word                           | "Desk"                  |
| `$5+`      | Additional words in order            | (continues for each word)|
| `$oldName` | Original filename (without extension) | "IMG_4521"              |

### Text Transformations

| Transformation        | Input → Output                              | Description                          |
|-----------------------|-------------------------------------------|--------------------------------------|
| `$upper{$1}`         | "Modern Office Desk" → "MODERN OFFICE DESK" | All uppercase               |
| `$lower{$1}`         | "Modern Office Desk" → "modern office desk"  | All lowercase              |
| `$capitalize{$1}`    | "modern office desk" → "Modern office desk"  | Capitalize first letter only  |

Transformations can be nested with any placeholder: `$upper{$2}` → "MODERN", `$lower{$1}` → "modern office desk".

### File Date Placeholders

| Placeholder                     | Description                              | Example Output       |
|---------------------------------|------------------------------------------|-----------------------|
| `$date{YYYY-MM-DD}`            | File creation date                      | "2024-12-07"         |
| `$date{DD_MM_YYYY}`            | Alternative date format                  | "07_12_2024"         |
| `$date{YYYYMMDD}`              | Compact date                             | "20241207"           |
| `$date{YYYYMMDD,modified}`     | File modification date                  | "20241207"           |

By default, `$date{}` uses the file **creation date**. Add `,modified` to use the **modification date** instead.

## EXIF Placeholders (Images Only)

EXIF metadata is embedded in photos by cameras and smartphones. These placeholders only work with image files that contain EXIF data.

### Date/Time from EXIF

| Placeholder                     | Description                              | Example                  |
|---------------------------------|------------------------------------------|--------------------------|
| `$exif{date}`                  | Capture date (YYYY-MM-DD)               | "2024-12-07"           |
| `$exif{date,YYYYMMDD}`         | Custom date format                       | "20241207"             |
| `$exif{date,DD-MM-YYYY}`       | European date format                     | "07-12-2024"           |
| `$exif{time}`                  | Capture time (HH-mm-ss)                  | "14-30-45"             |
| `$exif{time,HHmm}`             | Short time format                         | "1430"                 |
| `$exif{datetime}`              | Full date + time                        | "2024-12-07_14-30-45"  |

### Camera Information

| Placeholder                     | Description                               | Example                |
|---------------------------------|------------------------------------------|-------------------------|
| `$exif{camera}`                | Make + Model combined                    | "Canon_EOS_R5"        |
| `$exif{make}`                  | Camera manufacturer                       | "Canon"               |
| `$exif{model}`                 | Camera model name                        | "EOS R5"               |
| `$exif{iso}`                   | ISO sensitivity                          | "400"                 |
| `$exif{aperture}`              | Aperture value                           | "f2.8"                |
| `$exif{shutter}`               | Shutter speed                            | "1_250"               |

### GPS Location

| Placeholder                     | Description                               | Example                     |
|---------------------------------|------------------------------------------|----------------------------|
| `$exif{country}`               | Country name (from GPS)                 | "Germany"                |
| `$exif{city}`                  | City name (from GPS)                    | "Berlin"                |
| `$exif{region}`                | State or region                          | "Bavaria"               |
| `$exif{location}`              | City + Country combined                  | "Berlin_Germany"        |
| `$exif{gps}`                   | Raw GPS coordinates                      | "52.5200_13.4050"      |

### Generic EXIF Access

You can access **any** EXIF field by its name:

| Placeholder                | Example Output               |
|----------------------------|------------------------------|
| `$exif{Software}`         | "Adobe Photoshop"           |
| `$exif{LensModel}`       | "EF 50mm f/1.4"            |
| `$exif{Artist}`          | "John Doe"                 |
| `$exif{Copyright}`       | "© 2024 Photographer"      |

## Complete Pattern Examples

| Pattern                                   | Example Output                      | Use Case                        |
|-------------------------------------------|------------------------------------|---------------------------------|
| `$1`                                     | "Modern Office Desk.jpg"          | Default AI name                 |
| `$exif{date,YYYYMMDD}_$1`                | "20241207_Modern Office Desk.jpg" | Photo with date prefix          |
| `$exif{camera}_$1`                       | "Canon_EOS_R5_Modern Office Desk.jpg" | Photo with camera info         |
| `$exif{city}_$exif{country}_$1`          | "Berlin_Germany_Modern Office Desk.jpg" | Photo with location          |
| `$date{YYYY-MM-DD}_$1`                   | "2024-12-07_Modern Office Desk.jpg" | File date prefix               |
| `$upper{$2}_$lower{$3}`                  | "MODERN_office.jpg"              | Mixed case words                |
| `$oldName_$1`                             | "IMG_4521_Modern Office Desk.jpg" | Keep original + add AI name     |

## Date/Time Tokens

These tokens work inside both `$date{}` and `$exif{date,...}` / `$exif{time,...}`:

| Token   | Description                     | Example           |
|---------|----------------------------------|------------------|
| `YYYY`  | 4-digit year                     | 2024             |
| `YY`   | 2-digit year                     | 24               |
| `MM`   | Month (zero-padded)              | 07               |
| `DD`   | Day (zero-padded)                | 03               |
| `HH`   | Hour, 24h (zero-padded)          | 09               |
| `mm`   | Minute (zero-padded)             | 05               |
| `ss`   | Second (zero-padded)             | 07               |

**Allowed separators in patterns**: `-` and `_` (dots are not allowed)

## Tips

- **EXIF fields are image-only**: Using `$exif{}` on a PDF or text file will produce empty values
- **Missing EXIF data**: If an image lacks certain EXIF fields (e.g., no GPS), those placeholders are silently omitted
- **$date vs $exif date**: `$date{}` uses filesystem dates (works on all files); `$exif{date}` uses the camera's capture date
- **Test with preview**: The format editor shows a live preview so you can verify your pattern before saving
