Get full size properties (& perhaps a few other properties) using VBA of things in folders

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

StuartR wrote:
30 Jan 2024, 13:34
File size is NOT a good indication. You need a digital fingerprint to be sure
SpeakEasy wrote:
30 Jan 2024, 13:41
>can a bad person make a naughty file with evil things in it, give it the name of a known popular good file, then fiddle it to show exactly the same Byte size as a legit file? They can indeed! And they do.
Thanks both, that is good to know. I will need to bear that in mind and think a bit further/ differently.
I will take a guess that all properties can be fiddled as well?
(Even so, they may not always do that, so I think what I am doing is not totally useless, but maybe less certain/ useful then I was thinking. For example, for the case of a lot of program files, it might be more effort to fiddle them all than some bad people will think is worth it: There won't be many people with a quick programatic way to check properties, as I am attempting to do. )

https://eileenslounge.com/viewtopic.php ... 94#p315394
Last edited by DocAElstein on 20 Mar 2024, 15:14, edited 1 time in total.
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by ChrisGreaves »

StuartR wrote:
30 Jan 2024, 13:34
File size is NOT a good indication. You need a digital fingerprint to be sure
Hi Stuart. I agree that many properties need to be take into account. Hans's WSO_PropNames.xls gives many properties.
When I was eliminating duplicates in my MP3 files I contemplated using the "packets" of data in an MP3 - forget their names - so that instead of comparing the leading 800 bytes, or the trailing 800 bytes, or 800 bytes somewhere inside the MP3 file I could take a complete MP3 packet of data as a signature. The idea was to identify duplicate files where one file has had a few seconds of silence or applause trimmed from it, but the essential music remains identical.

Locating duplicate audio tracks is a tricky process.

Cheers, Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
StuartR
Administrator
Posts: 12605
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by StuartR »

You can use a hash algorithm like MD5 or SHA256 to verify that two files are identical, but it is much harder to identify two files where you consider that the difference is not significant.
StuartR


User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

Hi,
SpeakEasy wrote:
29 Jan 2024, 17:10
...You can actually reference the extended properties by name, rather than by number. This maintains consistency if Microsoft change the numbering
How? I have not been able to find a direct or built in way to do this yet.
This indirect way example workaraound below will work for me, but I thought I would ask in case I missed something?

What this function does is simply loop through all the property names, as given by the first few hundred numbers, PropItmNmbr , and if it finds the name you are looking for then it gives you the corresponding number, PropItmNmbr, which you can then use in the main coding in the usual WSO way, like this
objWSOFolder.GetDetailsOf(FldItm, PropItmNmbr)

Code: Select all

       '     https://eileenslounge.com/viewtopic.php?p=313909#p313909           https://eileenslounge.com/viewtopic.php?p=313838#p313838
Sub TestItmNmbrWSOfromPropName()    '                                                     https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23968&viewfull=1#post23968
' I want the Name property value. I can get it from  GetDetailsOf(FldItm, 0)  where  FldItm  is a windows shell object (WSO) folder item whose properties I am intersted in , and, as example, the  0  is the property item number, PropItmNmbr, that I have so far seen in any operating system for the property of the file or folder  Name
 MsgBox Prompt:=ItmNmbrWSOfromPropName("Name")           ' German and English  name property
 MsgBox Prompt:=ItmNmbrWSOfromPropName("Größe")          ' German size property
 MsgBox Prompt:=ItmNmbrWSOfromPropName("Size")           ' English size property          https://eileenslounge.com/viewtopic.php?p=313847#p313847
 MsgBox Prompt:=ItmNmbrWSOfromPropName("Dateiversion")   ' German version property
 MsgBox Prompt:=ItmNmbrWSOfromPropName("File version")   ' English version property

End Sub

Public Function ItmNmbrWSOfromPropName(ByVal PropNme As String) As String
Dim PropItmNmbr As Long
'Dim objWSO As Shell32.Shell                 ' Early Binding          ' Set objShell = New Shell32.Shell             '    https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg     https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpgDim objWSO As Object                        ' Late Binding
Dim objWSO As Object                        ' Late Binding
' Set objwso = New Shell32.Shell                                                                   '    https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg     https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
 Set objWSO = CreateObject("shell.application")
'Dim objWSOFolder As Shell32.Folder                                            : Set objWSOFolder = objWSO.Namespace(Parf)
Dim objWSOFolder As Object: Set objWSOFolder = objWSO.Namespace(ThisWorkbook.Path & "")     '  Any valid path will do       objWSO.Namespace(Parf & "")  '   & ""               ' https://stackoverflow.com/questions/33868233/shell-namespace-not-accepting-string-variable-but-accepting-string-itself/77888851#77888851     https://microsoft.public.access.narkive.com/Jl55mts5/problem-using-shell-namespace-method-in-vba#post5
'Dim FldItm As Shell32.FolderItem
    For PropItmNmbr = 0 To 400 Step 1
        'If objWSOFolder.GetDetailsOf("You can put anything here.  Null  is fashionable, but anything will do, as long as it is not a valid WSO folder item object - see https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg.9xhyRrsUUOM9zYlZPKdOpm", PropItmNmbr) = PropNme Then
        If objWSOFolder.GetDetailsOf(Null, PropItmNmbr) = PropNme Then
         Let ItmNmbrWSOfromPropName = PropItmNmbr   '  Effectively fill the pseudo String variable  ItmNmbrWSOfromPropName  with the number you were looking for
         Exit Function
        Else
        End If
    Next PropItmNmbr
 Let ItmNmbrWSOfromPropName = "Couldn't find the WSO property item number for a property with the name of    " & PropNme    '   '  Effectively fill the pseudo String variable  ItmNmbrWSOfromPropName  with a message if the WSO property name you gave could not be found for any og the numbers you looped  ( 0 to 400 )
End Function 
I don’t need super speed performance, so that solution would do. But I was thinking there might be some direct way with some existing method or similar which I have not been able to find yet, like pseudo something like this sort of form
objWSOFolder.GetDetailsOf(FldItm, "Name")


Thanks

Alan
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
SpeakEasy
4StarLounger
Posts: 550
Joined: 27 Jun 2021, 10:46

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by SpeakEasy »

>How?

By uising the (hidden) ExtendedProperty property ...

E.g:

Code: Select all

    With CreateObject("shell.application").Namespace("D:\downloads\deletemesoon").ParseName("doc5.docx")
        Debug.Print "Accurate size: " & .ExtendedProperty("System.Size")
        Debug.Print "Date Modified: " & .ExtendedProperty("System.DateModified")
        Debug.Print "Date Created " & .ExtendedProperty("System.DateCreated")
        Debug.Print "Path: " & .ExtendedProperty("System.ItemFolderPathDisplay")
        Debug.Print "Name: " & .ExtendedProperty("System.ItemNameDisplay")
        Debug.Print "Type: " & .ExtendedProperty("System.ItemTypeText")
    End With
Note that these do not match (generally) the GetDetailsOf property names. So if you want the full list you'll need to get hold of propkey.h, a header file in the Windows SDK. That file currently lists over 1000 extended properties (although many are not related to files or folders)

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

Thanks, that’s very interesting. It looks initially like I can possibly do without my function idea. But I will need to check this all out thoroughly on different computers and operating systems.
The file size is also the accurate Byte one, so I can possibly (**almost) do it all with this,
this is working for me so far in Windows 10 Pro , (**almost: The folder size is not working)

Code: Select all

 Sub TestExtendedThingLateBinding() ' https://eileenslounge.com/viewtopic.php?p=313961#p313961

Dim objWSO As Object      ' Late Binding                ' https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg  https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
 Set objWSO = CreateObject("shell.application")
Dim objWSOFolder As Object: Set objWSOFolder = objWSO.Namespace((ThisWorkbook.Path & ""))  ' (( & "" ))   ' https://stackoverflow.com/questions/33868233/shell-namespace-not-accepting-string-variable-but-accepting-string-itself/77888851#77888851  https://microsoft.public.access.narkive.com/Jl55mts5/problem-using-shell-namespace-method-in-vba#post5
Dim objWSOPassName As Object


' Test Folder
Set objWSOPassName = objWSOFolder.ParseName("Movie Maker") ' Folder
Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")   ' Accurate size:
Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified") ' Date Modified: 05.12.2023 14:30:42
Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated") ' Date Created: 04.02.2024 06:27:24
Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay") ' Path: F:\MMPropertyTest
Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")  ' Name: Movie Maker
Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")   ' Type: Dateiordner
Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")   ' Version:
Debug.Print

' Test File
Set objWSOPassName = objWSOFolder.ParseName("moviemk.exe") ' File
Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")   ' Accurate size: 3366912
Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified") ' Date Modified: 20.12.2002 12:06:00
Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated") ' Date Created: 04.02.2024 06:28:00
Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay") ' Path: F:\MMPropertyTest
Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")  ' Name: moviemk.exe
Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")   ' Type: Anwendung
Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")   ' Version: 2.0.3312.0
Debug.Print
End Sub
' https://www.eileenslounge.com/viewtopic.php?p=313975#p313975
Sub TestExtendedThingLateBindingEarlyBinding() '  https://eileenslounge.com/viewtopic.php?style=28&p=313975#p313975
Dim objWSO As Shell32.Shell     ' Early Binding
 Set objWSO = New Shell32.Shell    ' https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg  https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
Dim Parf As String: Let Parf = ThisWorkbook.Path
Dim objWSOFolder As Shell32.Folder: Set objWSOFolder = objWSO.Namespace(Parf)
Dim objWSOPassName As Shell32.FolderItem


' Test Folder
Set objWSOPassName = objWSOFolder.ParseName("Movie Maker") ' Folder
Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")   ' Accurate size:
Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified") ' Date Modified: 05.12.2023 14:30:42
Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated") ' Date Created: 04.02.2024 06:27:24
Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay") ' Path: F:\MMPropertyTest
Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")  ' Name: Movie Maker
Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")   ' Type: Dateiordner
Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")   ' Version:
Debug.Print

' Test File
Set objWSOPassName = objWSOFolder.ParseName("moviemk.exe") ' File
Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size")   ' Accurate size: 3366912
Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified") ' Date Modified: 20.12.2002 12:06:00
Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated") ' Date Created: 04.02.2024 06:28:00
Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay") ' Path: F:\MMPropertyTest
Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay")  ' Name: moviemk.exe
Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText")   ' Type: Anwendung
Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion")   ' Version: 2.0.3312.0
Debug.Print
End Sub

_._________________________________________________________

I am not quite sure what all this is about,
SpeakEasy wrote:
03 Feb 2024, 17:49
.... So if you want the full list you'll need to get hold of propkey.h, a header file in the Windows SDK. That file currently lists over 1000 extended properties (although many are not related to files or folders)
, But after an hour or two of searching I got something downloading.
But if there are 1000 extended properties then that sounds like I should try and investigate it
So I got something to keep me busy with for a day or two, thanks again
Alan

_.________________________________________________________________________-


Edit Later: Above coding in WSO_PropNamesExtended.xls. That file, and all sample files, and a propkey.h thing as a text file, propkey h.txt, in this Folder
MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v
See also here

ExtPropSamples.JPG
You do not have the required permissions to view the files attached to this post.
Last edited by DocAElstein on 04 Feb 2024, 08:04, edited 8 times in total.
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
SpeakEasy
4StarLounger
Posts: 550
Joined: 27 Jun 2021, 10:46

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by SpeakEasy »

>The folder size is not working

No, and it never will with the shell methods/properties for performance reasons (folders may have sub, sub-sub, sub-sub-sub folders, etc, so calculating the size may take a while). You have to calculate it yourself. The OS does this too - you can see it doing so when examining a Folder's property dialog

>after an hour or two of searching I got something downloading
Yep, that should do the trick

PJ_in_FL
5StarLounger
Posts: 1100
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by PJ_in_FL »

DocAElstein wrote:
03 Feb 2024, 21:47
... The folder size is not working) ...
Sir,

I'm confused. I thought from the OP that the goal was accurate file size. Now this discussion mentions folder size.

If actual folder size is the goal, unless you really want to continue the experimentation to learn all the ways to get bad information from Windows, use the FoldersReport utility from Nir Sofer.

If file size or size on disk, using a decent file manager will provide the information and the programmer has probably already had to deal with the vigarities of the different operating systems. My go to file manager for the past 20 years is xplorer2. Select the columns you want navigate to the folder. If you want to include all the subfolders, flatten the folder (shift-enter), then select all the files (ctrl-a) and copy the data (ctrl-p), then paste into an Excel sheet and process to your heart's content.

Just my $0.02 or 2.97 JPY worth of advise.
PJ in (usually sunny) FL

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

PJ_in_FL wrote:
05 Feb 2024, 20:38
Sir,

..I'm confused. I thought from the OP that the goal was accurate file size. Now this discussion mentions folder size. ....
... at Ease, Private PJ,

I caused the confusion, sorry about that, I messed up a couple of times when writing, – I mentioned file and files in folders a few times when I really meant to say things in folders, mostly files but also folders, and all stuff , files and folders in sub folders etc.
I am mostly interested in using VBA for getting a nice output in a spreadsheet to help me compare contents in program files for different sources of what should be the same or similar things. I am getting on OK with that now, but one thing that often cropped up is that folder size is not given, and file size was not always given so precisely, although the Microsoft File Scripting object (FSO) does do that consistently, accurate size in folders and files, and I can work that into my coding OK. (I only need that now for folder size - the last stuff from SpealEasy is getting everything else, so far - I am still checking that out thoroughly at the moment)
That nirsoft stuff looks worth a look, and might be useful to check a few things I might not otherwise have seen. ( I used nirsoft for something else a long time ago. Forgot what, but I remember it was very good)
Thanks for the reply

Alan
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Windows shell object Extendedproperties not giving results in XP with VBA coding

Post by DocAElstein »

Hallo
I have continued looking at the windows shell object ExtendedProperties VBA coding across a broad range of computers, operating systems, Excel versions, etc. It looks like a nice way which I would like to go with.
Just one disappointment so far:
The TLDR: - I don’t get any results in XP, where I am getting good consistent results in all other operating systems
I assume it’s an XP issue as I have tried a few different XP computers / laptops, so I doned a Thread with full details in the XP sub forum –
https://eileenslounge.com/viewtopic.php?f=21&t=40701

Anyone got any ideas?

Thanks, Alan
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Windows shell object Extendedproperties not giving results in XP with VBA coding

Post by ChrisGreaves »

DocAElstein wrote:
29 Feb 2024, 09:41
Anyone got any ideas?
he heh! :evilgrin:
Alan, I think I must have missed this, but I do believe that most of the coding on Properties (on all sorts of files) has been done for you.
Everything "does" properties with a vengeance.
This post should make your mouth water.
Untitled.png
In this image I have right-clicked on the column titles bar, then chosen "Picture" from a list of file types (Document, Audio etc) then chosen one of the six sub-menus for Picture, then chosen one of the sub-menus Advanced, which offers me 15 properties.
But of course each menu option along this path offers a dozen or so options.
Void is offering perhaps 1,300 or more properties. "You don't find it here, it ain't worth looking for"

I have not yet found "Type of cold meat in manufacture's luncheon sandwich" yet, but I'll bet Void is working on it; also whether the coffee was stirred clockwise or anti-

Let me know if you want to explore.

Choosing one or more properties to display in the result List allows you to fine-tune the selection process; you can then output the results list as a CSV file and just run that file list through your program to make what changes you want.
Stuart mentioned SHA256 and that is one of the hundreds of properties available in Everything for matching duplicates in Content.
Cheers, Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

Thanks Chris,
At first glance, this looks like a third party thing to do things on properties. Maybe also do things with properties, but I can’t immediately see a way to get a list of a few specific properties for every file and folder in a main folder, in a view something like the ones here and here and here
Also at first glance, it looks like it might be a much more extensive and better alternative to the in built right click on a file in windows folder explorer – Properties thingy. – So a much better manual way than the built in manual right click on a file in windows folder explorer – Properties thingy way to look at a file or two, or get to see some file types and there properties.
Another way of saying that is that it’s a useful tool to manually navigate about a file or files of a specific type or types, viewing and perhaps getting text file output of various sorted lists of what things you choose to view

Automating getting something like those spreadsheet views, ( with VBA most likely for a few good reasons, not all I can remember immediately just now , Lol ) , is what I want. I am very close, or have it actually, but this last snag in XP is spoiling what was looking up until then to be the nicest almost optimum way for me.
I want something to show me all the things in a program file folder, along with some of their properties to compare the contents of program files that should be similar for the same final software got from different computers or downloads claiming too be the same software product. (A view I can just about see all off for a few sets of program files on my wide old television screen without too much scrolling about to get a visual comparison of program file folders whose contents should be similar. For example that could help me patch together the optimum program file for some software , which would then successfully do irreparable damage to my computer when I try to run it, Lol.

Nevertheless it is useful to have that void everything stuff referenced here in this Thread. I might find it useful to check it out later to either do things with some file properties or check out some of the property values my VBA coding gives me. I don’t doubt it’s something useful to have and know about. But I am not familiar with it at all. Getting familiar with it might spread a bit thin my brain resources just at the moment.
( Also looks like doing something similar to your nicely demoed specific example could help me get some good property information about some video files , like the .wmv, which is one of a few types I am interested in, and whose properties from the WSO VBA ways I have been looking at were somewhat flaky.
So I will probably come back to this later. )

Alan
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by ChrisGreaves »

DocAElstein wrote:
29 Feb 2024, 15:05
At first glance, this looks like a third party thing to do things on properties.
Alan, I don’t see it that way. Everything can let you “do things” with properties, but The Theory Of Life includes the phase “Doing Something” is always GoTo, Select, Action” which we see expressed in Windows/Office applications.
Before you can inflict an Action on Something, you must first identify that <something>
Everything has no peer for identifying files, and as I pointed out, identifying files by their Properties – on which I think you want to act.
… but I can’t immediately see a way to get a list of a few specific properties for every file and folder in a main folder …
Making lists of files is EXACTLY what Everything does for you.
… it might be a much more extensive and better alternative to the in built right click on a file in windows folder explorer – Properties thingy
Here I disagree. It is so far ahead of Explorer that there is no real comparison. I would not lie to you (or to anyone else on Eileen's Lounge)

Automating getting something like those spreadsheet views, ( with VBA most likely for a few good reasons …
The developer of Everything has done all that automation for you. You do not need to develop any automation.
I want something to show me all the things in a program file folder, along with some of their properties ..
I know this; you want what Everything offers. Trouble is, Everything exists, does what you have mentioned, and is free.
But I am not familiar with it at all. …
Well, Alan, that’s why I’m here, isn’t it? :nurse:
Best of Luck.
Chris
There's nothing heavier than an empty water bottle

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

Hi Chris,
Your offer to help and enthusiasm is a real encouragement that there might be a small chance for mankind to survive a bit longer, but this void thing might be a non-starter for me personally: One of my contributions to the survival of mankind is to encourage people to think about using things Microsoft windows office from the 10-20 year ago era, so you have half a chance to own and use as you want a computer.
My current (smallish) problem related to this Thread, explained a bit more fully over in the XP sub forum, stems from a nice solution I have, not seemingly working in XP, which is not a tragedy, but annoying.

I just took a look at the void place, just a very quick initial look and was not so precise what I was looking for, but it did not take me long to trip over this…. https://www.voidtools.com/forum/viewtopic.php?t=13191
Everything uses the Windows Property System to gather the file version.
The Windows Property System is not supported on Windows XP.

I am not sure if that is telling me something related to my problem over at the XP sub forum,

I will look more thoroughly at all your responses and offers, which I appreciate, later, and get back to you
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by ChrisGreaves »

DocAElstein wrote:
29 Feb 2024, 20:01
... encourage people to think about using things Microsoft windows office from the 10-20 year ago era,...
Alan, I understand perfectly. During my years in business I used pure-Windows stuff a lot (and still do) because while I had access to 3rd-party, 3rd-party software was prohibited in many client sites in office towers.
So it MSPaint, Notepad and the like, and techniques to use them.
Cheers, Chris
There's nothing heavier than an empty water bottle

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

Hi,
Some weird co incidences have hit me in the past few years, (including some similar to those that happened to some bad people that convinced them they were the chosen one to take over the world) ….
Maybe in my case I am imagining it, or it is just Microsoft and Google taking over my PC and my mind…
So here is one, not so dramatic, but worth a follow up here in this Thread, I thought:….. I wanted to take a break from my experiments with Folder item properties, (and some naughty things I had better not mention), so for some light relief I did some mundane stuff of tidying up a forum by looking at soft deleted or closed, marked as possible spam Threads from years ago, waiting for someone like me to delete them permanently or reinstate them...
Fairly soon I coincidently hit this one, in a dead Outlook sub forum of all places!? (Further strangely its posted by a "guest" in 2017. As far as I know it’s only ever been possible to post there after registering, and certainly it was the case in 2017, so it’s something akin to a virgin birth as well)
https://www.excelfox.com/forum/showthre ... ased-Files
Virgin Birth- All Extended Property Of Windows Based Files.JPG
Now here is the strange coincidence, it’s a list of the names of "All Extended Property Of Windows Based Files" , which is what is related to what has been uppermost in my mind just now, and the main subject of this Thread.
They are given in that strange form:- {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 14
Now I remember a long time ago in a Thread at Eileen’s Lounge I did something like running them sort of things in PowerShell, (I can’t remember why now, but since then I get a lot of new applications starting when I restart the computer I did it on??)

So I am spending the rest of the day, or days, trying to find that old Thread, because I am thinking that God maybe had suggested I do it, in his mysterious way of moving and doing things.

In the meantime I thought I would share this information, in case anyone has any thoughts on:
( _ if I am the next chosen one )
_ how I might be able to somehow do things with these to get a file property information.? Possibly this weird variation on a theme might give another interesting solution to this thread, or point me in some useful direction. Or could I do anything else with them? For example, could these or what they might refer to help me to put things, programs, dlls things or the such, somewhere that might help me solve my recent related XP problem ?

I put those things in a text file, ( with and without the headings ). There are 154, which is less than both the main two ways discussed here so far,
the few hundred WSO Properties ( like from objWSOFolder.GetDetailsOf(FldrItm, 1) )
, and
the 1054 WSO Propherkeys (correspondingly like objWSOPassName.ExtendedProperty("System." & "Size") )
, so I am not sure which of those two, if any, they may be related to?

Thanks
Alan

( P.S. Anyone heard of a Keith Gibson? Google, finds, amongst others, one at Microsoft. I wonder what he is doing messing with my forum or my brain?)
You do not have the required permissions to view the files attached to this post.
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
HansV
Administrator
Posts: 78483
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by HansV »

That post was probably submitted by a registered member who has subsequently been deleted from the member list. The forum software then falls back to Guest as default.
Best wishes,
Hans

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by DocAElstein »

Ahh, OK, thanks.
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

User avatar
SpeakEasy
4StarLounger
Posts: 550
Joined: 27 Jun 2021, 10:46

Re: Get full size properties (& perhaps a few other properties) using VBA of things in folders

Post by SpeakEasy »

>They are given in that strange form

These are SCIDs, an alternative method of using ExtendedProperty.

So, if you examine the propkey.h file I pointed you to previously, you will see these 'strange' numbers as well as the System. name strings. They are an alternate method to access the property, and basically consist of GUID representing the Format ID (FMTID) defining a property set, and a PID that identifies a specific property within that set. Together these make up what Microsoft refer to as a SCID, and can be passed to ExtendedProperty as a string instead of the human-readable string

Here for example is the propkey.h entry for System.Size, with the SCID highlighted

// Name: System.Size -- PKEY_Size
// Type: UInt64 -- VT_UI8
// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
//
//
DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
#define INIT_PKEY_Size { { 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC }, 12 }


And here is how we can use it

Code: Select all

    Dim objShell As New Shell
            
    With objShell.Namespace("D:\downloads\deletemesoon").ParseName("20220501_103054.jpg")  ' your path and filename go here
        Debug.Print "Accurate size: " & .ExtendedProperty("System.Size")
        Debug.Print "Accurate size: " & .ExtendedProperty("{B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12")
    End With
(I don't expect this will fix your XP problem)

User avatar
DocAElstein
4StarLounger
Posts: 584
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

SCIDS, aHoy aHoy, https://www.youtube.com/watch?v=DDg1hy6VhxY&t=110s

Post by DocAElstein »

SpeakEasy wrote: https://www.eileenslounge.com/viewtopic ... 05#p314905
These are SCIDs, an alternative method of using ExtendedProperty…..
Thanks for all that. Interesting. I expect I will come back here often and ponder all that.
I have come across the {weird number in curly bracket unique identifier GUID things}, - I am not so totally sure what they are about but have used them and messed with them in a thread here that I am still looking for. ( I also have used them as a way to Late bind, and never really got the point so good there either, and I think in the thread I am looking for, I was randomly finding them {weird number in curly bracket unique identifier GUID things} in the registry and messing with them trying to figure out what they are about or what they did. (Often they seemed to "initiate" things on my computer to always start, things I never knew I had, and then wish I didn’t) )
It’s all a bit confusing for me, all these new terms, but never the less very helpful to have it all here as I expect eventually it may all fall in to place, when I re read, discover things, and keep experimenting, etc.
> ….examine the propkey.h file I pointed you to previously
I had spent some time already looking in detail at the text like file you pointed me to, thanks again for that. I examined it carefully to see exactly what characters are in it. ( https://www.excelfox.com/forum/showthre ... #post23981 I found, for example, that you do get what you see, - there are no strange "hidden" characters in it), so I made notes on it, isolated the names and went on to experiment using the name bits from it.
( https://www.excelfox.com/forum/showthre ... #post23983
https://www.excelfox.com/forum/showthre ... post239729

I was going to reference all that in some concluding feedback here, but then got unexpectedly stuck on the XP issue.
I had pulled out a list of all 1054 names to put in .ExtendedProperty("System.name")
, ( As you noted , > many are not related to files or folders. Indeed some are not simple strings, so you have to be careful when trying to look at them)
so, what next… Hmm…
, after I get my morning Buns, I the am going to go back to that now and pull out the SCIDs. For what reason I don’t know yet.
_._________
( I had not noticed yet that that the GUIDs in that forum post I found tied up with the ones in the propkey h text file thing. I see now they do, thanks for the heads up. (These GUID things seem to have their ugly head all over the place so my first reaction was to ignore the ones in the propkey h text file thing , Lol. ) )

Thanks for the enlightening reply, (although my dim brain may take a while to lighten up… but it usually does, thanks to a good forum reply database, :) ;) )
Alan

_.________________

Edit P.S.
SpeakEasy wrote:
03 Mar 2024, 12:08
..(I don't expect this will fix your XP problem)
Correct, it don’t seem to…
But….
….A bit of Laymen lateral thinking… These GUIDs refer to other stuff, often I think some sort of sub programs, libraries of stuff, including perhaps functions / programs, ( dll and COM codswallops & co ) that may or may not be available. I wonder if when I look now at the relevant GUIDs , maybe see if I can group them together, or analyse them in some other Autistic way, then me or someone smarter may be able to identify some "download package/ install cabinet or kitchen sink" or whatever, that I am missing on my XP machines that is causing my XP problem ?? - Just a thought that only 9 time out of 10 is rubbish
Last edited by DocAElstein on 05 Mar 2024, 08:38, edited 2 times in total.
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(