Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MDW MDW is offline
external usenet poster
 
Posts: 117
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
MDW MDW is offline
external usenet poster
 
Posts: 117
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
send parameters to a batch file with the shell command Marcos[_2_] Excel Programming 6 May 28th 06 07:53 PM
Shell to different app then open file within Justin[_12_] Excel Programming 0 November 30th 04 11:26 PM
Shell command and exe file conundrum Greg Wilson[_4_] Excel Programming 2 September 4th 04 09:24 PM
Batch file in Shell Function Eric[_14_] Excel Programming 2 November 14th 03 11:08 PM
Copying a file with VBA (or with a SHELL command) Franck V. Excel Programming 1 September 15th 03 07:46 PM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"