May be you could find some one to write a script.
Warning: Moving the files needs to be done nefore importing into Lightroom otherwise the synchronization with it is lost.
In python that looks like
"""
Tool for the management of photograph files taken in burst
Creates a sub directory for each burst of images
Moves all the files of images taken in a burst to the directory they belong
A burst is defined as the set of files for which
the times they have been taken do not have a gap of more of a delay
Author: hpchavaz
License: MIT Henri-Pierre Chavaz, 2020, https://hpchavaz-photography.blogspot.com/
"""
from sys import exit
from os import listdir, mkdir, rename
from os.path import exists, isfile, join, splitext
from shutil import move
from datetime import datetime, timedelta
from exif import Image
# the path to the files
mypath = "J:\DATA\DEV\Python\VS CODE\image\Burst"
""" Returns the exif datatime_original attribute of an image file if exists or None """
def getimagedate(image):
while True:
try:
datestr = getattr(image, "datetime_original")
date = datetime.strptime(datestr, '%Y:%m:%d %H:%M:%S')
break
except:
date= None
break
return date
""" Make an ordered list of files with an exif datatime_original attribute """
datedexifimages = []
for fn in [f for f in listdir(mypath) if isfile(join(mypath, f))]:
with open(join(mypath, fn), 'rb') as image_file:
image = Image(image_file)
if image.has_exif:
date = getimagedate(image)
if date:
datedexifimages.append([fn, date])
datedexifimages.sort(key= lambda it: it[1])
""" To facilitate validation before the real commands are played
the latter are kept in lists """
MkdirList = [] # the list of folders to create
MoveList = [] # the list of files to move
ErrorList = [] # the list of errors (existing files or folders)
PrettyList = [] # the list to print for validation
CurBurstFolderName = "" # the name of folder for the the curent burst
""" Update lists for a new burst """
def newburst(imgItem):
global CurBurstFolderName
nbfn = join(mypath, splitext(imgItem[0])[0])
if exists(nbfn):
ErrorList.append("Folder: "+ nbfn + " already exists")
else:
CurBurstFolderName = nbfn
MkdirList.append(nbfn)
PrettyList.append("NEW BURST: "+ nbfn)
""" Update lists for a new file in a burst """
def inburst(imgItem):
global CurBurstFolderName
if CurBurstFolderName != "":
nfn= join(CurBurstFolderName, imgItem[0])
if exists(nfn):
ErrorList.append("Folder: "+ CurBurstFolderName + " : File; " + nfn + "already exists")
else:
MoveList.append([join(mypath, imgItem[0]), nfn])
PrettyList.append(" > "+ imgItem[0]+ " > " + nfn)
""" Create the lists by collecting image in same burst """
delta = timedelta(0, 1)
if len(datedexifimages) >= 1:
burst = False
for ind in range(1, len(datedexifimages)-1):
if (datedexifimages[ind][1] - datedexifimages[ind - 1][1]) >= delta:
burst = False
else:
if burst == False:
newburst(datedexifimages[ind - 1])
inburst(datedexifimages[ind - 1])
burst = True
inburst(datedexifimages[ind])
print("------------- MkdirList -----------")
[print(i) for i in MkdirList ]
print("------------- MoveList -----------")
[print(i[0], " > ", i[1]) for i in MoveList ]
print("------------- ErrorList -----------")
[print(i) for i in ErrorList]
ui = input("To continue? Y(y)/N: ")
if ui.capitalize() != 'Y':
sys.exit(-1)
[mkdir(i) for i in MkdirList ]
[rename(i[0], i[1]) for i in MoveList ]