+ Reply to Thread
Results 1 to 3 of 3

Using Shell To Get File Info

  1. #1
    MDW
    Guest

    Using Shell To Get File Info

    I know that I can use the DsoFile Tool to get file attributes and summary
    data about files without having to open them. However, I'm looking for a
    solution that doesn't require the installation of any ancillary tools.

    It appears that the Shell object might be able to provide access to some
    file attributes (I'm looking for either the "Category" or "Keywords" summary
    data attributes), but I can't quite get it to work.

    Set objShell = CreateObject("Shell.Application")

    Set objNS = objShell.NameSpace("C:\")

    For Each objItem In objNS.Items

    MsgBox objItem.ExtendedProperty(???)

    Next

    I'm not sure what the key words are for the extended properties. I tried
    just putting in "Category" and it gets a 0-length string.

    Any help?
    --
    Hmm...they have the Internet on COMPUTERS now!

  2. #2
    Steve Yandl
    Guest

    Re: Using Shell To Get File Info

    This link may break because of word wrap but it should have what you want.
    You need "GetDetailsOf".

    http://www.microsoft.com/technet/scr....mspx?mfr=true

    Steve Yandl



    "MDW" <[email protected]> wrote in message
    news:[email protected]...
    >I know that I can use the DsoFile Tool to get file attributes and summary
    > data about files without having to open them. However, I'm looking for a
    > solution that doesn't require the installation of any ancillary tools.
    >
    > It appears that the Shell object might be able to provide access to some
    > file attributes (I'm looking for either the "Category" or "Keywords"
    > summary
    > data attributes), but I can't quite get it to work.
    >
    > Set objShell = CreateObject("Shell.Application")
    >
    > Set objNS = objShell.NameSpace("C:\")
    >
    > For Each objItem In objNS.Items
    >
    > MsgBox objItem.ExtendedProperty(???)
    >
    > Next
    >
    > I'm not sure what the key words are for the extended properties. I tried
    > just putting in "Category" and it gets a 0-length string.
    >
    > Any help?
    > --
    > Hmm...they have the Internet on COMPUTERS now!




  3. #3
    MDW
    Guest

    Re: Using Shell To Get File Info

    You have just saved my life! You're my new hero!
    --
    Hmm...they have the Internet on COMPUTERS now!


    "Steve Yandl" wrote:

    > This link may break because of word wrap but it should have what you want.
    > You need "GetDetailsOf".
    >
    > http://www.microsoft.com/technet/scr....mspx?mfr=true
    >
    > Steve Yandl
    >
    >
    >
    > "MDW" <[email protected]> wrote in message
    > news:[email protected]...
    > >I know that I can use the DsoFile Tool to get file attributes and summary
    > > data about files without having to open them. However, I'm looking for a
    > > solution that doesn't require the installation of any ancillary tools.
    > >
    > > It appears that the Shell object might be able to provide access to some
    > > file attributes (I'm looking for either the "Category" or "Keywords"
    > > summary
    > > data attributes), but I can't quite get it to work.
    > >
    > > Set objShell = CreateObject("Shell.Application")
    > >
    > > Set objNS = objShell.NameSpace("C:\")
    > >
    > > For Each objItem In objNS.Items
    > >
    > > MsgBox objItem.ExtendedProperty(???)
    > >
    > > Next
    > >
    > > I'm not sure what the key words are for the extended properties. I tried
    > > just putting in "Category" and it gets a 0-length string.
    > >
    > > Any help?
    > > --
    > > Hmm...they have the Internet on COMPUTERS now!

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1