Currently I'm using the following code :
I "borrowed" this code from : @danishani
(Thank you)
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim objFSO As Object
Dim objFolder As Object
Dim objFoto As Object
Dim strOudeNaam, strNieuweNaam As String
Set objFSO = CreateObject("Shell.Application")
Set objFolder = objFSO.Namespace(strFolderOpladen)
For Each objFoto In objFolder.Items
strOudeNaam = strFolderOpladen & "\" & objFoto.Name
strDatum = objFoto.ModifyDate
'but : strDatum = objFoto.DateCreated <========= NOT OK
strJaar = Mid(strDatum, 7, 4)
strMaand = Mid(strDatum, 4, 2)
strDag = Left(strDatum, 2)
strUur = Mid(strDatum, 12, 2)
strMin = Mid(strDatum, 15, 2)
strSec = Mid(strDatum, 18, 2)
strNieuweNaam = strFolderOpladen & "\F" & strJaar & strMaand & strDag & "-" & strUur & strMin & strSec & ".jpg"
If Len(Dir(strNieuweNaam)) > 0 Then
Do Until Len(Dir(strNieuweNaam)) = 0
pubInteger = Val(strSec) + 1
strSec = Right("00" & Trim(Str(pubInteger)), 2)
strNieuweNaam = strFolderOpladen & "\F" & strJaar & strMaand & strDag & "-" & strUur & strMin & strSec & ".jpg"
End If
Name strOudeNaam As strNieuweNaam
Next objFoto
This works perfect.
The problem is that DateModify isn't the date that the image was created.
I need the date created.
I tried a number of names (DateCreated, DateTime, OriginalDate etc. etc.)
But so far only DateModify works.
Does anybody knows the other names I can use besides DateModify ?
I read about jhead.exe and exiftool.exe , but these are to complex for me.
Crystal and Colin have recently done a video about ExIfs with Access: https://www.youtube.com/watch?v=fwQnhKWo1Ks
Maybe you find the right property or method there.
Servus
Access-Entwickler-Konferenz: https://www.donkarl.com/?AEK
Access DevCon: http://AccessDevCon.com
Access FAQ (de/it): https://www.donkarl.com