Copy link to clipboard
Copied
Hi everyone! I'm facing a challenge with managing date metadata in my photos, and I would really appreciate your help.
Context: I started by looking into whether Google Photos could automatically change the capture date in the metadata so I could download the photos and maintain the order in other galleries, like Samsung's. Unfortunately, I found that it can't do this automatically; it only allows me to manually adjust the "creation date" on their platform, not the IPTC or XMP metadata fields where the "capture date" is stored in the photo file.
Now, I’m looking for a way to automate this process. Ideally, I want software that can read the date from the file name and place it in the "capture date" metadata field of each image. Does anyone have experience or advice on how to achieve this? Maybe there’s a tool or script that makes it easy. I'm asking here because perhaps Adobe has already provided a tool for this in their suite, or even Premiere might be able to help.
One of the challenges is that there are different date formats in the file names. For example, some images have the date in the format xx-xx-xx, others just as xxxxxx, and some have screenshot text before the date.
Any suggestions would be greatly appreciated! Thanks in advance!
Copy link to clipboard
Copied
Bridge offers light capabilities to edit the date/time metadata:
For anything heavier, I would use ExifTool:
https://exiftool.org/forum/index.php?topic=14314.msg77137#msg77137
https://exiftool.org/Shift.html
It would be helpful if you posted sample images using the different filename formats.
Copy link to clipboard
Copied
Thank you so much for your response! I swear I've been trying to solve this problem for over a week, searching through forums and even Discord channels.
To give you a bit more context: I'm having issues transferring photos from Google Photos to my Samsung gallery. Some images, like TikTok videos or WhatsApp images, don’t have embedded date metadata, so they don’t show up correctly in the Samsung gallery timeline. Google Photos displays them in the correct order by upload date, but when I manually download and transfer them to my phone, this order is lost.
I have about a thousand photos, and the file names contain dates in various formats, which makes automation challenging. Examples include: 20181209_151918, download_20180820_165447, IMG-20180815-WA0098, and Screenshot_20221031-092757_One UI Home, among others.
Would you mind if I contacted you on Discord to make the communication easier? If not, we can keep chatting here—no worries. Given all this, what would you recommend I do? Thanks again for your help; I really appreciate it!
Copy link to clipboard
Copied
You can send me a PM if you don't wish to share the images publicly. I would need at least one example of each different filename setup to compare with the underlying date/time metadata. Do any of these images also contain GPS metadata for date and time, or is this only basic file system and EXIF date created, date modified etc.? Do any files come from "bursts" where you would also have millisecond metadata? I am not sure about video metadata, I mostly work with still images.
Copy link to clipboard
Copied
Hi there, as you told me, here are all the different name formats that I currently have in my photos. Those that retain location information, I would like to keep as they are. As for the time, I know it appears in most filenames as well, but I don’t mind keeping or losing it. I don’t have any burst photos either.
I have a general understanding of what metadata is, but I’m not very familiar with the different types. What I’d really like is to have a consistent organization when downloading them to my gallery.
This is the google drive link to those fotos (I don't care people to see them):
https://drive.google.com/drive/folders/1QqNWqznx8OEsgYlMP5X0F7LGLkCeRo_N?usp=sharing
Once again, i really apreciate your help 😉
Copy link to clipboard
Copied
It's a mess with all of those different filename patterns!
A couple of random examples using ExifTool:
FileName : 2021_03_25_dragon-boy--hielo-y-fuego-17254612.png
FileModifyDate : 2024:10:27 21:38:15+11:00
FileAccessDate : 2024:10:27 21:38:58+11:00
FileInodeChangeDate : 2024:10:27 21:38:56+11:00
This first example only appears to have YYYY MM DD info, is this correct?
And:
FileName : Screenshot_2023-06-12-21-06-22-731_com.google.android.youtube.jpg
FileModifyDate : 2024:10:27 21:40:39+11:00
FileAccessDate : 2024:10:27 21:40:42+11:00
FileInodeChangeDate : 2024:10:27 21:40:41+11:00
The second example have both YYYY MM DD and HH MM SS info as well, is this correct?
I have applied colour coding to help identify the patterns in the filename and where I believe they should be used in the metadata.
Copy link to clipboard
Copied
Sure! Both examples are right... But what I'm not getting is how I'm gonna be able to automatize all the process with the 1000 photos... I've downloaded the folder of exifTool, but I don't really know how to continue 😞
Copy link to clipboard
Copied
Sure! Both examples are right... But what I'm not getting is how I'm gonna be able to automatize all the process with the 1000 photos... I've downloaded the folder of exifTool, but I don't really know how to continue 😞
By @Albjav12345
You should download the compiled Windows executable or Mac package – unless you wish to get into Perl, ignore the .tar.gz. file!
I don't believe that this can be scripted in Bridge, or if it can, I'm not the one to do so.
The process would be that conditional regular expression capture groups would be used to isolate the date and or time information from the filename, then this would be used as the source for changing the date and time metadata information.
Until I have a working example, it's just a half-baked idea! This may or may not be workable. And if it is, you will need different commands for each of the different filename patterns.
I'll let you know how I go, this isn't going to be fast.
Copy link to clipboard
Copied
With ChatGPT help i've created a script that mostly does a right work 😉 so then the non-modified images I'll just modify them manually.
@ECho off
setlocal enabledelayedexpansion
:: Cambia a la carpeta de las fotos
cd "C:\Users\Alberto\Desktop\Photos-001"
:: Crear carpetas de destino si no existen
set "modifiedDestination=C:\Users\Alberto\Desktop\Modified images"
if not exist "!modifiedDestination!" (
mkdir "!modifiedDestination!"
)
set "nonDetectedDestination=C:\Users\Alberto\Desktop\Non Detected Patrons"
if not exist "!nonDetectedDestination!" (
mkdir "!nonDetectedDestination!"
)
:: Procesar todos los archivos de la carpeta
for %%f in (*.*) do (
set "filename=%%~nf"
echo Procesando archivo: %%f
:: Intentar extraer fechas en los patrones conocidos
set "dateTime="
set "metadataChanged=false" :: Variable para verificar si se cambió metadata
:: Formato YYYY-MM-DD-HHmmss
for /f "tokens=1,2,3,4,5,6 delims=-_" %%a in ("!filename!") do (
if "%%b" neq "" (
set "dateTime=%%a-%%b-%%c %%d:%%e:%%f"
)
)
:: Formato YYYYMMDD_HHmmss
if not defined dateTime (
for /f "tokens=1 delims=_" %%a in ("!filename!") do (
if "%%a" neq "" (
set "dateTime=!filename:~0,4!:!filename:~4,2!:!filename:~6,2! !filename:~9,2!:!filename:~11,2!:!filename:~13,2!"
)
)
)
:: Si se identificó la fecha y hora
if defined dateTime (
echo Fecha y hora extraída: !dateTime!
exiftool "-DateTimeOriginal=!dateTime!" "%%f"
set "metadataChanged=true" :: Indica que se cambió metadata
)
:: Mover archivos según el cambio de metadata
if "!metadataChanged!"=="true" (
echo Moviendo a la carpeta de Modified images: %%f
move "%%f" "!modifiedDestination!"
) else (
echo No coincide con ningún patrón: %%f
move "%%f" "!nonDetectedDestination!"
)
)
:: Verificar archivos en la carpeta Non Detected Patrons al final
echo Verificando archivos en Non Detected Patrons para asegurarse de que estén correctamente clasificados...
cd "!nonDetectedDestination!"
for %%g in (*.*) do (
exiftool -s -s -s -DateTimeOriginal "%%g" | findstr /r /c:":\|$" >nul
if errorlevel 1 (
echo %%g no tiene metadatos de fecha. Moviendo a Non Detected Patrons.
) else (
echo %%g tiene metadatos de fecha.
move "%%g" "!modifiedDestination!"
)
)
echo Proceso completado.
pause
endlocal