Folder & File Name Patterns

This page will explain how to use folder and file name patterns.

Dynamic Patterns Overview

When uploading large volumes of website screenshots to your cloud repository, it's important to have a clear and consistent naming convention. This is where dynamic folder and file name patterns can be incredibly useful.

A folder and file name pattern is simply a string that can contain multiple variables that are replaced with actual values when the screenshot is uploaded to your cloud storage account. Variables are indicated by single curly braces around them. For example, a {domain} {YYYY} pattern might render the value of the domain variable (e.g. example.com) and the current year (e.g. 2023) in the current context, resulting in a file name like example.com 2023.png.

Dynamic patterns can help you organize and manage your screenshots more effectively, making it easier to locate and retrieve specific screenshots when needed. They can also save you time and effort by automating the naming process and ensuring that each screenshot is named consistently and accurately.

If you're using a cloud storage service like Azure Blob Storage or an AWS bucket to store your website screenshots, dynamic patterns can be a powerful tool for streamlining your workflow and maximizing the benefits of cloud storage.

There are several variables available as described below.

Pattern Examples

The examples below are based on a pattern with a combination of variables.

The image type such as .png or .jpeg is automatically added to the file path.

Folder PatternFile PatternFull Path Output
{domain}{id}example.com/23eb2408ed0e4770bc4d53a37ee26357.png
{YYYY-MM-DD}myscreenshot2020-08-25/myscreenshot.png
{datetime}image {url}2020-08-25 23-50-45/image https_www.example.com_product.png
{filename} - {search}products_phones - size_large_tab_overview.png

Date Examples

 VariableOutputCase Sensitive
YearYY20 21 ... 29 30No
YYYY2020 2021 ... 2029 2030No
MonthM1 2 ... 11 12Yes
MM01 02 ... 11 12Yes
MMMJan Feb ... Nov DecYes
MMMMJanuary February ... November DecemberYes
Day of MonthD1 2 ... 30 31Yes
DD01 02 ... 30 31Yes
Day of Weekd0 1 ... 5 6Yes
dddSun Mon ... Fri SatYes
ddddSunday Monday ... Friday SaturdayYes
HourH0 1 ... 22 23No
HH00 01 ... 22 23No
Minutem0 1 ... 58 59Yes
mm00 01 ... 58 59Yes
Seconds0 1 ... 58 59Yes
ss00 01 ... 58 59Yes
Franctional SecondS0 1 ... 8 9Yes
SSS000 001 ... 998 999Yes
Datesdate2020-08-25 (YYYY-MM-DD)No
date_IANA/Timezone
date_Australia/Brisbane
2020-08-25 (YYYY-MM-DD)
in Brisbane timezone (see IANA Timezones)
Yes
datetime2020-08-25 23-50-45 (YYYY-MM-DD HH-mm-ss)No
datetime_IANA/Timezone
datetime_Australia/Brisbane
2020-08-25 23-50-45 (YYYY-MM-DD HH-mm-ss)
in Brisbane timezone (see IANA Timezones)
Yes
dateiso2020-08-25T01-13-09-108Z (see toISOString)No
dateutcSun 09 Aug 2020 01-13-09 GMT (see toUTCString)No
datelocal8-9-2020 1-13-09 PM (see toLocaleString)No

All dates are in UTC format.

URL & Unique ID Examples

The variables are case insensitive (e.g. {domain} and {DOMAIN} will be accepted).

The examples below are based on the fictional URL https://www.example.com/products/phones.php?size=large&tab=overview

VariableOutput
uuid23eb2408-ed0e-4770-bc4d-53a37ee26357
id23eb2408ed0e477...a37ee26357
urlhttps_www.example.com_...overview
protocolhttps
hostname (or domain)www.example.com
pathname_products_phones_php
filepathproducts_phones
searchsize_large_tab_overview

Request Examples

Use the values in the request parameters (query string or body).

Boolean values that are true will be replaced with the name of the property as shown in the examples below.

Sample URL https://api.addscreenshots.com/screenshots?apikey=YOUR_API_KEY&width=1366&height=768&quality=80&fullpage=true&mobile=true&grayscale=false&url=youtube.com

VariableOutput
width1366
height768
quality80
fullpagefullpage (name of the boolean parameter when true)
mobilemobile
grayscale  (empty since it is set to false)

Folder & File Pattern Generator

Use the folder and file tester below to see a sample folder and filename output based on dynamic patterns.

Note that the request variables are limited to width, height, quality, fullpage, mobile and grayscale for this demo.

Add one URL per line.

Specify a folder name pattern

Specify a file name pattern