I'd like to retrieve the timestamp of .jpg-files. The only thing I found was
that this info is stored in the exif-data of the files, but I can't find a
way to retrieve this from my vba-code.
Anyone ?
Tanx in advance !
D
Bas.
"Daedalus" <fdpro...@hotmail.com> wrote in message
news:4b37aadc$0$394$5f6a...@news.scarlet.nl...
Adapt this a bit
Option Compare Database
Option Explicit
Function GetFileSize(strFileName As String, MinSize As Long) As Long
' ?getfilesize("C:\Documents and Settings\Phil\My
Documents\Access\MDB\WFYC\PDFS\DummyRenewal.pdf", 23000)
If strFileName = "" Then
Exit Function
End If
'Create an instance of the FileSystemObject
Dim fs As Object
Dim LngFileSize As Long
Dim objFile
On Error GoTo GetFileSize_Err
GetFile:
Set fs = CreateObject("Scripting.FileSystemObject")
'Get a file object
Set objFile = fs.GetFile(strFileName)
'Get the file size
LngFileSize = objFile.Size
' Here you can have
debug.Print objfile.datecreated
'or
debug.Print objfile.datelastAccessed
'or
debug.Print objfile.datelastModified
If LngFileSize < MinSize Then
'Debug.Print LngFileSize
GoTo GetFile
End If
GetFileSize = LngFileSize
GetFileSize_Exit:
Set objFile = Nothing
Set fs = Nothing
Exit Function
GetFileSize_Err:
Set objFile = Nothing
Set fs = Nothing
MsgBox Err.Description
Resume GetFileSize_Exit
End Function
Lars
"Phil" <ph...@stantonfamily.co.uk> schreef in bericht
news:IKmdnVsIYbx-g9zW...@brightview.co.uk...
Sorry I didn't explain in detail. The exif-data contain much more info than
the file-timestamp, and I'm interested in these data (things like
resolution, which apparatus made the file, etc). The timestamp is only one
of those data, and is not the same as the Windows-timestamp.
D
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Daedalus" <fdpro...@hotmail.com> wrote in message
news:4b44b108$0$398$5f6a...@news.scarlet.nl...