Skip to main content
Breaks a full file path apart into its separate pieces and returns them together as a small set of named values: the folder (dirname), the full filename (basename), the filename without its extension (filename), and the extension on its own (extension). Use this when you need more than one part of a path at once, for example to keep the folder and the extension but rename the file. The extension part is only included when the file actually has one.

Fields

This mapper has no settings to configure. It always parses the path you give it into its parts.

Sample data

FieldValue
(no settings)
Input:
{ "path": "/uploads/products/scarf-blue.jpg" }
Output:
{
    "path": {
        "dirname": "/uploads/products",
        "basename": "scarf-blue.jpg",
        "extension": "jpg",
        "filename": "scarf-blue"
    }
}