# Artwork to Folder

This function is used to save artwork to specified folders. At most one copy of an image will be saved to any one folder.

You can elect to save all the artwork, only the first artwork item or all but the first artwork item. You can also choose to only save artwork matching a specific index, picture type or description. The index and description fields may contain any of the escape sequences described in Escape Sequences. Note that the description tests are always performed case insensitive.

If the Output folder field is empty, artwork will be placed in the same folder as the track which contained the artwork. You can use the Choose button to select a folder.

The Output folder field may contain any of the escape sequences described in Escape Sequences. At runtime the path must resolve to be one of the following formats:

- An absolute path starting with /
- A path relative to the user home folder starting with ~/
- A path relative to the track's containing folder, starting with ./ or ../

The output folder will be created if it does not exists.

The name of the produced file is constructed as follows. Note that all the components are optional with the condition that at least one must be specified.

1. The contents of the Filename prototype field. The supplied string may contain any of the escape sequences described in Escape Sequences.
2. The appended name of the album from which the artwork is taken.
3. The appended description associated with the artwork item.
4. The appended picture type associated with the artwork item.
5. The appended index of the artwork in its containing track. (Base 1).

If during the execution of the function a constructed filename has already been used in a given folder, (#) will be appended to make the filename unique.

Note that files which existed prior to the execution of the function will be overwritten.

While implemented to be very efficient in stepwise mode, this function is valid in all execution contexts.