×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

File properties

File properties

File properties

(OP)
is there a way i can retrieve all of the file properties from a file - i know how to retrieve the file name and size with the properties of a FileSystemObject, but not how to get other properties, such as the image size or Date Picture Taken from a jpeg imported from a camera. - how do i get a complete list of the properties for a file?

RE: File properties

The following code will fill a list box with all the extended properties that the Shell knows about:

CODE

Private Sub Command1_Click()

    Dim i As Long
    Dim objShell As Object
    Dim objFolder As Object
    
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace("C:\")
    
    Do Until objFolder.GetDetailsOf(objFolder.Items, i) = ""
        ListBox1.AddItem objFolder.GetDetailsOf(objFolder.Items, i)
        i = i + 1
    Loop

End Sub

Given a specific named property from this list and a file, we can extract that value of the property (if that particular file supports it ...) something like this:

Debug.Print CreateObject("Shell.Application").Namespace("C:\Downloads").Items.Item("000-012.jpg").ExtendedProperty("Owner")

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close