# Bulk Renaming

<figure><img src="/files/q7jPrsaOaQcN0IRQqNGD" alt=""><figcaption></figcaption></figure>

Filestar has a powerful renaming system that allows you to control the filename for the produced files.

In the following examples let's assume that we are converting the file `cat.jpg` to a PNG image. The following path template will give us the filename `cat.png`:

```
<Filename>.<Extension>
```

Anything between `<` and `>` is a special tag that is replaced with a value. Between the tags, you can have any characters to form your path and filenames.

By specifying path templates you can create advanced renaming rules. Here's an example:

```
<Image.Location>\<Image.Year>-<Image.Month>-<Image.Day>\<Filename>.<Extension>
=> "New York\1982-07-17\Photo.jpg"
```

### Supported Tags <a href="#supported-tags" id="supported-tags"></a>

#### Filename <a href="#filename" id="filename"></a>

Is replaced with the name of the original file excluding the extension.

#### Extension <a href="#extension" id="extension"></a>

Is replaced with the new extension.

#### Order <a href="#order" id="order"></a>

Some skills return more than one file (like splitting a document into images). The tag is replaced with the numeric index of the output file counted from 0. Formatting can be controlled with the Format argument.

```
<Filename>_<Order Format="D3">.<Extension> 
=> "Document_001.jpg", "Document_002.jpg"...
```

#### Page <a href="#page" id="page"></a>

Works the same way as the tag but the numeric index is counted from 1.

#### Guid <a href="#guid" id="guid"></a>

Is replaced with a new [Guid](https://en.wikipedia.org/wiki/Universally_unique_identifier).

#### ArchivePath <a href="#archivepath" id="archivepath"></a>

This tag is used when extracting files from an archive like a zip file to extract the files with the same folder structure as in the archive.

#### Md5 <a href="#md5" id="md5"></a>

Is replaced with the Md5 hash of the file.

#### File <a href="#file" id="file"></a>

Is replaced with a file property.

```
<File.Created Format="yyyy-MM-dd">
<File.Modified Format="yyyy-MM-dd">
```

#### Image <a href="#image" id="image"></a>

Is replaced with image metadata.

```
<Image.Title>
<Image.Latitude>
<Image.Longitude>
<Image.Year>
<Image.Month>
<Image.Day>
<Image.Taken Format="yyyy-MM-dd">
<Image.Location>
```

#### Mp3 <a href="#mp3" id="mp3"></a>

Is replaced with mp3 metadata.

```
<Mp3.Title>
<Mp3.Album>
<Mp3.Artist>
<Mp3.Track>
<Mp3.Subtitle>
<Mp3.Year>
<Mp3.Genre>
<Mp3.Composer>
<Mp3.Disc>
```

#### Tag <a href="#tag" id="tag"></a>

The tag is a special tag that can be used in combination with the "By Path" file selection method to submit a list of filenames through a CSV format.

#### Case.Lower <a href="#caselower" id="caselower"></a>

Method for lowercasing.

```
<Case.Lower><Filename></Case.Lower>
```

#### Case.Upper <a href="#caseupper" id="caseupper"></a>

Method for uppercasing.

```
<Case.Upper><Filename></Case.Upper>
```

#### Trim <a href="#trim" id="trim"></a>

Method for removing unwanted characters at the start or the end of a string.

```
<Trim Chars="_"><Filename></Trim>
```

#### Substring <a href="#substring" id="substring"></a>

Method for cutting out a piece of a string.

```
<Substring Index="0" Length="5"><Filename></Substring>
```

#### Replace <a href="#replace" id="replace"></a>

Method for replacing all occurrences of one string with another.

```
<Replace Old="x" New="y"><Filename></Replace>
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.filestar.com/advanced/bulk-renaming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
