Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4339356
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:12:20+00:00 2026-05-21T11:12:20+00:00

Trying to use Excel VBA to capture all the file attributes from files on

  • 0

Trying to use Excel VBA to capture all the file attributes from files on disk, including extended attributes. Was able to get it to loop through the files and capture the basic attributes (that come from the file system):

  • File Path
  • File Name
  • File Size
  • Date Created
  • Date Last Accessed
  • Date Last Modified
  • File Type

Would also like to capture the extended properties that come from the file itself:

  • Author
  • Keywords
  • Comments
  • Last Author
  • Category
  • Subject

And other properties which are visible when right clicking on the file.

The goal is to create a detailed list of all the files on a file server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:12:21+00:00Added an answer on May 21, 2026 at 11:12 am

    You say loop .. so if you want to do this for a dir instead of the current document;

    Dim sFile As Variant
    Dim oShell: Set oShell = CreateObject("Shell.Application")
    Dim oDir:   Set oDir = oShell.Namespace("c:\foo")
    
    For Each sFile In oDir.Items
       Debug.Print oDir.GetDetailsOf(sFile, XXX) 
    Next
    

    Where XXX is an attribute column index, 9 for Author for example.
    To list available indexes for your reference you can replace the for loop with;

    for i = 0 To 40
       debug.? i, oDir.GetDetailsOf(oDir.Items, i)
    Next
    

    Quickly for a single file/attribute:

    Const PROP_COMPUTER As Long = 56
    
    With CreateObject("Shell.Application").Namespace("C:\HOSTDIRECTORY")
        MsgBox .GetDetailsOf(.Items.Item("FILE.NAME"), PROP_COMPUTER)
    End With
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Excel VBA to write to a text file. I'm doing
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
VBA newbie over here. I'm trying to use an array formula through excel vba
I'm trying to insert some data into SQL from Excel VBA. The SQL commands
I'm trying to (HTTP) upload a binary file programmatically from within VBA. I intend
I am trying to use the Worksheet Change Event in Excel VBA, but it
I'm using VBA in Excel and am trying to use the popular ShellAndWait subroutine.
Hi All in new to using VBA in excel and was trying to create
I am trying to use VBA in Excel to add conditional formatting to a
I'm trying to use a post form to generate an excel file after choosing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.