Export/sharing file name pattern for photo files.

Located in Settings > Photo file name pattern, this screen allows you to set up a file name pattern for the saved/exported/shared photo based on the photo data fields.

When photos are saved to a photo library, Files app, iCloud files, or any cloud/network disk connected, AirDrop, etc - the file name will be based on the configured pattern. By default, pattern is simply a photo title.

Some fields can be edited via photo comments editor (Title, Note, Folder/tags field name, Folder/Collection, Address). Some fields are embedded in the photo metadata, e.g. coordinates, heading, altitude.

By default, the photo title field is used as the file name when photo is saved, shared or exported.

From version 4.0 you can configure custom pattern for the file names.

Here is an example of a customized pattern:

filename-pattern-patterns

Different file name patterns can be set up for saving/sharing/exporting a single photo and for a batch of photos.

For the example above a single file name for the stamped photo might be:

05Feb24 16-56_#12_2024-02-05-16-56-35+0100_C_50.09519, 14.50290±5mWGS84.0.s.jpg

For the batch of 3 exported/shared stamped photos, the names might be:

05Feb24-12-44_#10_2024-02-05-12-44-32+0100_C_50.09519,-14.50290±5mWGS84_#003.0.s.jpg
05Feb24-13-34_#11_2024-02-05-13-34-41+0100_C_50.09519,-14.50290±5mWGS84_#002.0.s.jpg
05Feb24-16-56_#12_2024-02-05-16-56-35+0100_C_50.09519,-14.50290±5mWGS84_#001.0.s.jpg

By default, file name pattern for the batch export/sharing is based on the single file name pattern. But you can setup a completely different pattern for the batch export/sharing as well.

Adding fields to a file name pattern.

Tap on a “+” button in the pattern row to add a field.

Available fields:

  • Photo title (default). Editable via photo comments editor.
  • Custom text. You can add a free text here.
  • Photo capture date. Embedded in the photo metadata.
  • Photo location coordinates. Embedded in the photo metadata.
  • Photo location altitude. Embedded in the photo metadata.
  • Photo heading. Embedded in the photo metadata.
  • Photo note. Editable via photo comments editor.
  • Photo address. Editable via photo comments editor.
  • Tags field (folder field name in the photo notes editor). Editable via photo comments editor.
  • Folder/Collection name. Editable via photo comments editor.

Addional fields are available for the batch export/sharing:

  • Single file name pattern. Allows to use the single file name pattern as the base for the batch file name.
  • File sequence number in the batch.

Date field format.

When a capture date field is present in the pattern, pattern editor will show a section to configure its format:

filename-pattern-date

To keep it really flexible, the app gives you an option to configure a format string itself, no limits here.

To give you basic ideas on what can be configured or give you a chance to restore to one of the pre-canned formats, the app provides a short list of possible formats. Tap on “Show examples of date/time format” to see the list:

filename-pattern-date-samples

You can use one of these, or be inspired by them. For the full format specification please google “ISO 8601”.

Batch sequence number format.

If batch file name pattern contains file sequence number, the app will offer to set up number of numeric places in it:

filename-pattern-sequence-number

Handling whitespaces in the file names.

filename-pattern-spaces-settings

While having whitespaces in the file names might look nicely, whitespaces might cause issues for some file providers or scenarios when transferring the files.

Let’s see the example of sharing/exporting the same photo 4 times from the app to Mac via Airdrop:

file-pattern-spaces-explain

Title of the photo is “29Jan24 19-47”.

#1 and #2 - Sharing is done with substituting spaces in the file name with “-”. As you can see all shared nicely and Mac OS appended " 2" suffix for the second transfer of a file with the same file name.

#3 - First share of the photo with keeping spaces. Transferred and named as desired.

#4 - Mac OS or Airdrop in this instance stopped naming the incoming file at a space when it determined that there are files with the “same” name up to this space. As the previous known “duplicate” file was 29Jan24 19-47_33UVR6444649331±10mWGS84_#0001.0.s.jpg it named the incoming file as 29Jan24 20.s.jpg taking 19, 20 as sequence number for duplicate file names in this case.

This happens to Airdrop, this doesn’t happen when saving to iCloud “Files” where “Files” asks if you want to replace or keep both, intelligently assigning " 2" suffix to the second file with the same name.

So depending on the transfer scenario and files provider you might have different handling of whitespaces and this section should give you more options to adapt.

Default for this setting is NO - no substitution of whitespaces happens by default.


Additional information:


Edge cases.

When using “Save N images” option for multiple selected photos in the iOS sharing sheet to save photos to the photo library, in iOS 17, file names are not based on any pattern and will come out as random.

All other tested file or email sharing providers (Dropbox, Google drive, Files, QFile, Google email, Apple Mail, iMessage, Telegram) - supported all of the tested pattern combinations.


Tips & tricks.

Find exported/shared photo files within certain heading range (Mac OS or Linux).

Add Heading to the photo file name. Share, save or export selected photos/points.

Given the folder content as (ls -1):

07Feb24@17-49_#24_H_NW314°T_A_240m.0.s.jpg
07Feb24@17-49_#25_H_N357°T_A_240m.0.s.jpg
07Feb24@17-49_#26_H_NE44°T_A_240m.0.s.jpg
07Feb24@17-49_#27_H_E97°T_A_240m.0.s.jpg
07Feb24@17-49_#28_H_SE143°T_A_240m.0.s.jpg
07Feb24@17-49_#29_H_S188°T_A_240m.0.s.jpg

Use:

ls | perl -nle  'print "${_}\t$1\n" if /_H_\D*(\d+)\D/' | awk -F '\t' '$2 > 100 && $2 < 200 {print $1,$2}'

To find files for photos with heading between 100 and 200 degrees:

07Feb24@17-49_#28_H_SE143°T_A_240m.0.s.jpg 143
07Feb24@17-49_#29_H_S188°T_A_240m.0.s.jpg 188

Write to support@blocoware.com if you need more tips here for filtering on photo files.