• ADv File Attributes (Office 2003)

    Author
    Topic
    #394823

    Anyway to programmatically get to the advanced file properties? I have a bunch of photos, and need to know the date/time they were taken (not modified). Any help would be appreciated.

    Viewing 5 reply threads
    Author
    Replies
    • #726903

      Microsoft has a DLL for (free) download that can get at Office document properties without opening the documents. It also works with other file types on Windows 2000 with NTFS, and I suppose that implies that it will also work on Windows XP and Windows Server 2003 with NTFS. I don’t know if this applies to your situation.

      See Dsofile.exe Lets You Edit Office Document Properties from Visual Basic and ASP.

    • #726904

      Microsoft has a DLL for (free) download that can get at Office document properties without opening the documents. It also works with other file types on Windows 2000 with NTFS, and I suppose that implies that it will also work on Windows XP and Windows Server 2003 with NTFS. I don’t know if this applies to your situation.

      See Dsofile.exe Lets You Edit Office Document Properties from Visual Basic and ASP.

    • #727036

      You can also use the Scripting FileSystemObject to get certain file information. Example:

      Public Sub GetFileProperties(ByRef strFilePath As String)

      Dim fso As New Scripting.FileSystemObject
      Dim f As Scripting.File

      Set f = fso.GetFile(strFilePath)

      Debug.Print “Date Created: ” & f.DateCreated
      Debug.Print “Date Last Modified: ” & f.DateLastModified
      Debug.Print “Date Last Accessed: ” & f.DateLastAccessed
      Debug.Print “Size: ” & f.Size & ” bytes”
      Debug.Print “Path: ” & f.Path
      Debug.Print “Short Path: ” & f.ShortPath

      Set fso = Nothing
      Set f = Nothing

      End Sub

      Example use with a .JPG file:

      GetFileProperties “C:Documents and SettingsMARK DMy DocumentsMy PicturesPhoto.jpg”
      Date Created: 7/30/2003 09:13:51 PM
      Date Last Modified: 7/30/2003 09:13:41 PM
      Date Last Accessed: 10/10/2003 04:19:00 AM
      Size: 16799 bytes
      Path: C:Documents and SettingsMARK DMy DocumentsMy PicturesPhoto.jpg
      Short Path: C:DOCUME~1MARKD~1MYDOCU~1MYPICT~1Photo.jpg

      To be able to use FileSystemObject properties & methods, set a reference in your project to either Microsoft Scripting Runtime or Windows Script Host Object Model. The other option is to use the Windows API directly to get file information, but if all you need is Date Created, etc, using FSO is a lot simpler.

      HTH

    • #727037

      You can also use the Scripting FileSystemObject to get certain file information. Example:

      Public Sub GetFileProperties(ByRef strFilePath As String)

      Dim fso As New Scripting.FileSystemObject
      Dim f As Scripting.File

      Set f = fso.GetFile(strFilePath)

      Debug.Print “Date Created: ” & f.DateCreated
      Debug.Print “Date Last Modified: ” & f.DateLastModified
      Debug.Print “Date Last Accessed: ” & f.DateLastAccessed
      Debug.Print “Size: ” & f.Size & ” bytes”
      Debug.Print “Path: ” & f.Path
      Debug.Print “Short Path: ” & f.ShortPath

      Set fso = Nothing
      Set f = Nothing

      End Sub

      Example use with a .JPG file:

      GetFileProperties “C:Documents and SettingsMARK DMy DocumentsMy PicturesPhoto.jpg”
      Date Created: 7/30/2003 09:13:51 PM
      Date Last Modified: 7/30/2003 09:13:41 PM
      Date Last Accessed: 10/10/2003 04:19:00 AM
      Size: 16799 bytes
      Path: C:Documents and SettingsMARK DMy DocumentsMy PicturesPhoto.jpg
      Short Path: C:DOCUME~1MARKD~1MYDOCU~1MYPICT~1Photo.jpg

      To be able to use FileSystemObject properties & methods, set a reference in your project to either Microsoft Scripting Runtime or Windows Script Host Object Model. The other option is to use the Windows API directly to get file information, but if all you need is Date Created, etc, using FSO is a lot simpler.

      HTH

    • #727400

      This is often referred to as EXIF information, and there’s another acronym I can’t remember (OSPF?). There are third party libraries available to access these attributes, including many open source projects at SourceForge in various stages of completion.

      • #728065

        Exif. Bingo. I was able to get the data needed. Now I just have to figure out why Windows won’t show me it, when it would last week.
        thanks

      • #728066

        Exif. Bingo. I was able to get the data needed. Now I just have to figure out why Windows won’t show me it, when it would last week.
        thanks

    • #727401

      This is often referred to as EXIF information, and there’s another acronym I can’t remember (OSPF?). There are third party libraries available to access these attributes, including many open source projects at SourceForge in various stages of completion.

    Viewing 5 reply threads
    Reply To: ADv File Attributes (Office 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: