PDA

View Full Version : TestsExplorerWSO



DocAElstein
09-16-2015, 03:25 PM
This is post #post23777
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23777
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23777




Before going any further, I think I would like to take a bit of a tie out and recheck the codiing

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313859#p313859 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313859#p313859)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313855#p313855 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313855#p313855)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313848#p313848 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313848#p313848)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313843#p313843 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313843#p313843)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313792#p313792 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313792#p313792)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313771#p313771 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313771#p313771)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313767#p313767 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313767#p313767)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313746#p313746 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313746#p313746)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313744#p313744 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313744#p313744)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313741#p313741 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40560&p=313741#p313741)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313622#p313622 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313622#p313622)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313575#p313575 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313575#p313575)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313573#p313573 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313573#p313573)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313563#p313563 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313563#p313563)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313555#p313555 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=313555#p313555)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533)
https://www.eileenslounge.com/viewtopic.php?f=39&t=40265&p=313468#p313468 (https://www.eileenslounge.com/viewtopic.php?f=39&t=40265&p=313468#p313468)
https://www.eileenslounge.com/viewtopic.php?f=42&t=40505&p=313411#p313411 (https://www.eileenslounge.com/viewtopic.php?f=42&t=40505&p=313411#p313411)
https://www.eileenslounge.com/viewtopic.php?f=32&t=40473&p=313384#p313384 (https://www.eileenslounge.com/viewtopic.php?f=32&t=40473&p=313384#p313384)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40501&p=313382#p313382 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40501&p=313382#p313382)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40501&p=313380#p313380 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40501&p=313380#p313380)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40501&p=313378#p313378 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40501&p=313378#p313378)
https://www.eileenslounge.com/viewtopic.php?f=32&t=40473&p=313305#p313305 (https://www.eileenslounge.com/viewtopic.php?f=32&t=40473&p=313305#p313305)
https://www.eileenslounge.com/viewtopic.php?f=44&t=40455&p=313035#p313035 (https://www.eileenslounge.com/viewtopic.php?f=44&t=40455&p=313035#p313035)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312889#p312889 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312889#p312889)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
09-16-2015, 03:25 PM
This is post #post23775
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23775
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23775



More detailed careful analysis of Movie Maker program files.
A couple of short comings made the comparison of versions so far a bit more difficult than need be.
_ Lack of full examination of contents of any **sub folders in the main Movie Maker folder made it more difficult to determine a good ordered positioning in a list of similar versions.
_ As well as physically checking the dates where possible in the computers for the case of files obtained from existing computers with original installs, doing this by coding on the actual computers, rather than gives more reliable properties, in particular the dates.

Some slightly advanced/ intermediate coding.
Recap. Previous coding.
I have already used some coding from this good source, https://www.youtube.com/watch?v=jTmVtPHtiTg . Summarised, the coding there treats things, (I think probably everything, Folders and files), in a folder as Items of that folder. You loop throughjust those items, and so are able to get a lot of properties for each one. Each property is returned from a code line of this general form PropertyValue = objFolder.GetDetailsOf(Fil, 166)
This will then be a "one level" thing – "across the board", a row, line type look. Files in this folder will have their properties analysed, as will any other thing’s such as Folders, (**in this situation those folders within the main folder are often referred to as sub Folders). But we did not look inside those sub folders.

Recap. The basic looping structure would then be of this sort of form
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(FullPathToFolder) '
Dim Fil As Shell32.FolderItem
__For Each Fil In objFolder.Items
___PropertyValue = objFolder.GetDetailsOf(Fil, 166)

__Next Fil
So , briefly, Fil is declared as a folder Item, and we loop through each of them in the folder. At each loop we can get a particular property from a number. In that example I have 166, which so far always seems to give me a version number.
To get the full listing of the numbers for the different properties available, see here https://www.youtube.com/watch?v=jTmVtPHtiTg&t=560s
Also notes on the basic coding using the windows Shell object can be see here

So that was the basic coding.
The advanced coding.
The main advancement will be to examine contents of all sub folders. In other words all folders and files at any level or row in the
This comprises two main codings. Sub PassFolderForReocursig1() and Private Sub FileFolderProps(ByVal Pf As String)
The main purpose of this is
_ To produce the first two columns of output. The first is the property names and the second the corresponding property values for the main folder, Movie Maker
_ This folder, ( actually it’s name, Movie Maker ) is then passed to the next macro, Sub PassFolderForReocursig()

Sub PassFolderForReocursig() Brief code description
' 1b
In this macro, you need to hard code the variable Parf to the Folder path of the Folder that contains the main Movie Maker folder.
Typically in the practice this will be either
_ The path to program files if you are checking out the original Movie Maker folder. This will likely be some form similar to something like, C:\Program
or
_ The path to a copy made or downloaded, which is likely in the same as, or close to, the path to where the Excel file containing the macros are.
The first option is preferable, if possible, since the copy my effect properties changing them from the original, and for the comparison purposes we are interested in, the original non changed values are preferable.
' 1c
In the top left cell of where the output starts, ( which will be the active cell at the time of running ) part of the path you gave will be printed out for future reference to give an indication of where the rest of the files and folders that will be listed are/ were at the time of running the macro.

Rem2 Rem 3
The windows shell object way, ( ) is used to get the names and values. For each of the properties we are interested there are two possibilities to get the name of the property for the first column output. I give both, and the first one is 'commented out. This first one is OK if you are sure you know the number to use for that property. The second line is perhaps preferable, as it will be obvious if for some reason the number is not as you expected since you will not get the correct name that you were expecting. ( Microsoft seem to have changed the properties available and the number referring to some of them https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg.9zYoeePv8sZ9zYqog9KZ 5B )

So the first program gives us a listing in the first column of the property names that we are interested in, and the second column gives us the values for the Main Movie Maker folder of those properties.
What we want to do now, is go on to look at all folders and files in this main Movie Maker folder, not just the folder and files seen by looking in the first "level down". In other words we want to delve down further to see what is inside any folders ( "sub Folders" ), within the main Movie Maker folder, so Rem 4 , passes the folder path to the Main Movie Maker folder on to the next code, which forms the main new advanced coding being introduced which uses the so called reoccurring routine, or recursion technique do delve down is and where necessary to get at all files and folders



Here is the first macro


Option Explicit
Dim Clm As Long, Reocopy As Long ' variable for column number to put file or folder details in, number representin the copy of the second macro

' Select the cell where a main folder(s) last bit of its Parf will go. This macro will list, starting with the folder name under that patf bit, a few property names. In the naxt column the corresponding property value will be given
'
Sub PassFolderForReocursing()
'Sub SchellFolderDetails2() ' Jan 2024 https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23775
Rem 0
Let Clm = 0: Reocopy = -1
Rem 1
Dim Ws As Worksheet: Set Ws = Me ' G:\YouTubeVideos&Anaslysis&HackingTricks\VideoRecordingEditing\Windows (Live) Movie Maker\Movie Maker Versions.xls
' 1b
Dim Parf As String
Let Parf = ThisWorkbook.Path & "\Versions Downloads Exes\Verson 2, 2 1 2 5 Downloads 2,1\50 Euro Keks"
Let Parf = ThisWorkbook.Path & "\50 Euro Keks"
' 1c
If Len(Parf) - Len(Replace(Parf, "\", "", 1, -1, vbBinaryCompare)) >= 2 Then
Let ActiveCell = Mid(Parf, InStrRev(Parf, "\", InStrRev(Parf, "\", -1, vbBinaryCompare) - 1, vbBinaryCompare))
Else
Let ActiveCell = Parf
End If
Rem 2 Windows Shell object
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Parf) '
Rem 3 Movie Maker Folder Property names and Property values.
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' We loop through all items to find the Movie Maker folder ' =======
If Fil.Name = "Movie Maker" Then
Dim Rw As Long: Let Rw = 1
'Let ActiveCell.Offset(Rw, 0) = "Name": Let ActiveCell.Offset(Rw, 1) = objFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw, 0) = objFolder.GetDetailsOf("Goolies", 0): Let ActiveCell.Offset(Rw, 1) = objFolder.GetDetailsOf(Fil, 0)
'Let ActiveCell.Offset(Rw + 1, 0) = "Größe": Let ActiveCell.Offset(Rw + 1, 1) = objFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 1, 0) = objFolder.GetDetailsOf(71, 1): Let ActiveCell.Offset(Rw + 1, 1) = objFolder.GetDetailsOf(Fil, 1)
'Let ActiveCell.Offset(Rw + 2, 0) = "Elementtyp": Let ActiveCell.Offset(Rw + 2, 1) = objFolder.GetDetailsOf(Fil, 2)
Let ActiveCell.Offset(Rw + 2, 0) = objFolder.GetDetailsOf(Parf, 2): Let ActiveCell.Offset(Rw + 2, 1) = objFolder.GetDetailsOf(Fil, 2)
'Let ActiveCell.Offset(Rw + 3, 0) = "Änderungsdatum": Let ActiveCell.Offset(Rw + 3, 1) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 3, 0) = objFolder.GetDetailsOf(Ws, 3): Let ActiveCell.Offset(Rw + 3, 1) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
'Let ActiveCell.Offset(Rw + 4, 0) = "Erstelldatum": Let ActiveCell.Offset(Rw + 4, 1) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, 0) = objFolder.GetDetailsOf(Left("gh", 2), 4): Let ActiveCell.Offset(Rw + 4, 1) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, 0) = objFolder.GetDetailsOf("Bum", 166): Let ActiveCell.Offset(Rw + 5, 1) = objFolder.GetDetailsOf(Fil, 166)

Rem 4
ActiveCell.Offset(0, 2).Activate
' 4b
Call FileFolderProps(Parf & "\Movie Maker")
Exit For ' Once we have passed on the full path of the folder, Movie Maker , then we are finished with this macro, so we don't need loop further looking fot the Movie Maker folder
Else
End If
Next Fil ' ================================================== =========================================
End Sub




The next post considers the main advanced coding of the second macro

DocAElstein
09-16-2015, 03:25 PM
This is post#post23774
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23774
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23774




Advanced File and Folder analysis coding - Reoccurring or Recursion Codings
Here are both the previous macro and that we are considering here, together. https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23915&viewfull=1#post23915 Together they form the advance solution being sicudded here
The first macro in this pair, as considered in the last post cannot run on its own since it would error when trying to set off ( Call ) the second macro. The second macro is the Recursion / reoccurring coding ,which we are considering here.
The second macro which we are considering here, has arguments that must be given, so is the form of macro that generally needs another macro to set off ( Call it ) and in doing those setting off / Calling, it passes it the required argument(s) In our example it is passing the full path to our Main Movie Maker program folder. This is what is needed to create the windows shell object, ( pseudo like code line, Set WindShellobjFolder = objShell.Namespace(The full path string to the program folder here) )

Part 1 Recursion / reoccurring coding
The word Recursionor recursion techniques in coding often puts people off, but I think it’s actually straight forward and easy to understand if explained fully but simply and in particular accurately: It seems that some wording is typically used in explanations, or used by people who understand it,when talking about it, and these words are at best incorrect and at worst confusing nonsense.For example, it is often at an early stage of explaintions, said that a code using recursion techniques Calls itself. That is inaccurate nonsense, or maybe something that can be justified to say technically but in a common sense point of view is inaccurate nonsense.

So forget anything you heard before about recursions and start again:
_1) The written code you see, for example in the VB Editor is just that. It’s just written code. It never runs, walks, or drives to the local shops to buy you any Buns. It can’t do anything at all. What actually runs coding is something with perhaps some limited similarity to the written coding somewhere deep in the innards of a computer. Some compile process makes the coding that will actually be run, and it uses the written code to determine what coding you wanted.
(Something similar that is important to realise, if you are familiar with the F8 Debug step mode, is that the F8 Debug step mode is extraorganised just for our Human eye convenience. We can’t actually see the coding being run in the step mode, but some extra software is used for our convenience to show approximately what part of the actual coding is running, since the actual coding is organised into a similarly set out series of instructions.)
_2) Because the actual used coding is not that written one, but rather coding made to the specifications of the written coding, many languages, such as that (VBA), coding associated with MS Office, is happy to make a few copies of the coding you want. Furthermore, whist we can’t easily run more than one copy at a time, we can curiously start another copy before the previous copy is finished. What happens then is that at the start of another copy, the previous copy is paused, and it resumes at the point it paused at,when the new copy is finished.

That’s it. If you understood that you know all about recursion. Perhaps it is just worth notingthat you are not limited to just a couple of copies. You can have a few of them, each one setting off another copy. When a copy sets off another copy, then it is paused and has to wait until the copy it set off is finished before it can continue. In order for this to work, a paused coding needs to work a bit differently to a coding that is finished. In particular, when a copy is paused, any variables that were filled have their values stored , "stacked", somewhere, so that the variables can be refilled when the paused copy restarts. This extra process has to be done because ordinarily variables within coding would usually lose their values when a code stops in the more usual way, which is at the end, when it is finished.

As far as the typical practical coding is concerned, generally at the code line that a copy of coding sets off another copy of the same coding,some sort of conditional If statement or similar is used , so that hopefully at some point all copies started get finished allowing the previous ones also at some point to finish. Otherwise the recursion / code reoccurring goes on for ever, or would do, if something does not get too big, or something runs out of space, leading to some error such as the famous "stack overflow" error.

A pictorial explanation may help here to re iterate the Recursion / Reoccurring coding process:
Here is a quick simple explanation of recursion with some emphasis on our actual next coding, Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
We remember from the last post that, the coding being discussed in this post, Private Sub ReoccurringFileFolderProps(ByVal Pf As String) gets Called by this code line in the first macro,
Call ReoccurringFileFolderProps(Parf & "\Movie Maker")
So that tells us that whenit starts, itisalso "fed" / passed the full path to the Movie Maker Folder that we want analysed

Basic Code explanation, simplified
_A) When running more usually, no recursion / reoccurring coding.
In its simplest working, which it might do, for example the case of only files and no sub folders in the main Movie Maker folder, the codingis just our basic coding using the windows shell object to loop through all the items in the Movie Maker folder. Those items are all files, no sub folders, so the condition at ' 2b ,
If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner"Then Call ReoccurringFileFolderProps(Pf & "" & objFolder.GetDetailsOf(Fil, 0))
, is not met

Effectively then, it is as if the ' 2b section is not there, and we are basically doing our most basic looping of all folder Items ( files in this case ), and listing some of their properties at each loop. So the == Main Loop == :below is the only significant coding

Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variableReocopyis zero.It will become 1 on first entering the macro.Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use.However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2and so on.So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf)'
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)' Name
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1) ' Size
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2) ' Type
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare)) ' Chang Date
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare)) ' Made Date
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166) ' File Version
'_________________________________________________ ________________________________________________
' 2bHere we may pause the macro, whilst another copy of it is started
'If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner" Then Call ReoccurringFileFolderProps(Pf & "\" & objFolder.GetDetailsOf(Fil, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the above code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next Fil ' ============================== Main Loop============================================== ===|

Let Reocopy = Reocopy - 1' We are finished at this point with this running copy of the macro.This code line will reduce the value indicating the copy number is running since this copy ends in the next line
End Sub


So now consider that at some point in the looping through the folder items, it did encounter a folder, in other words one of the items was a folder. What will happen now is that after the properties of that item ( the folder ) are outputted, we will carry out this line

Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variableReocopyis zero.It will become 1 on first entering the macro.Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use.However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2and so on.So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf)'
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)' Name
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1) ' Size
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2) ' Type
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare)) ' Chang Date
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare)) ' Made Date
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166) ' File Version
'_________________________________________________ ________________________________________________
' 2bHere we may pause the macro, whilst another copy of it is started
'If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner" Then Call ReoccurringFileFolderProps(Pf & "\" & objFolder.GetDetailsOf(Fil, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the above code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next Fil ' ============================== Main Loop============================================== ===|

Let Reocopy = Reocopy - 1' We are finished at this point with this running copy of the macro.This code line will reduce the value indicating the copy number is running since this copy ends in the next line
End Sub


Let’s consider for simplicity, the found folder has only files in it. We consider this fully in the next post.

DocAElstein
09-16-2015, 03:25 PM
Basic Code explanation.
_B) When running in the loop for the item that is a folder with some files in it
Because the folder item has just files in it, we can say that for the loop for the item that is a folder, this is the actual coding that is run

Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variableReocopyis zero.It will become 1 on first entering the macro.Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use.However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2and so on.So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf)'
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)' Name
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1) ' Size
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2) ' Type
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare)) ' Chang Date
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare)) ' Made Date
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166) ' File Version
'_________________________________________________ ________________________________________________
' 2bHere we may pause the macro, whilst another copy of it is started
' Pause first macro, start a second copy
Sub ReoccurringFileFolderProps(Pf & "\" & objFolder.GetDetailsOf(Fil, 0)) = ReoccurringFileFolderProps(That to Sub Folder)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variableReocopyis zero.It will become 1 on first entering the macro.Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use.However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2and so on.So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf)'
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)' Name
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1) ' Size
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2) ' Type
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare)) ' Chang Date
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare)) ' Made Date
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166) ' File Version
'_________________________________________________ ________________________________________________
' 2bHere we may pause the macro, whilst another copy of it is started
'If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner" Then Call ReoccurringFileFolderProps(Pf & "\" & objFolder.GetDetailsOf(Fil, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the above code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next Fil ' ============================== Main Loop============================================== ===|

Let Reocopy = Reocopy - 1' We are finished at this point with this running copy of the macro.This code line will reduce the value indicating the copy number is running since this copy ends in the next line
End Sub
'_________________________________________________ ________________________________________________
' If we did pause whilst the above code line set off another copy, then when that is finished we will come here and resume the paused previous copy
' Stop second macro, resume first macro
'
Next Fil ' ============================== Main Loop============================================== ===|

Let Reocopy = Reocopy - 1' We are finished at this point with this running copy of the macro.This code line will reduce the value indicating the copy number is running since this copy ends in the next line
End Sub








Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variableReocopyis zero.It will become 1 on first entering the macro.Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use.However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2and so on.So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf)'
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)' Name
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1) ' Size
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2) ' Type
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare)) ' Chang Date
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare)) ' Made Date
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166) ' File Version
'_________________________________________________ ________________________________________________
' 2bHere we may pause the macro, whilst another copy of it is started
' Pause first macro, start a second copy
Sub ReoccurringFileFolderProps(Pf & "" & objFolder.GetDetailsOf(Fil, 0)) = ReoccurringFileFolderProps(That to Sub Folder)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variableReocopyis zero.It will become 1 on first entering the macro.Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use.However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2and so on.So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf)'
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)' Name
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1) ' Size
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2) ' Type
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare)) ' Chang Date
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare)) ' Made Date
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166) ' File Version
'_________________________________________________ ________________________________________________
' 2bHere we may pause the macro, whilst another copy of it is started
'If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner" Then Call ReoccurringFileFolderProps(Pf & "" & objFolder.GetDetailsOf(Fil, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the above code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next Fil ' ============================== Main Loop============================================== ===|

Let Reocopy = Reocopy - 1' We are finished at this point with this running copy of the macro.This code line will reduce the value indicating the copy number is running since this copy ends in the next line
End Sub
'_________________________________________________ ________________________________________________
' If we did pause whilst the above code line set off another copy, then when that is finished we will come here and resume the paused previous copy
' Stop second macro, resume first macro
'
Next Fil ' ============================== Main Loop============================================== ===|

Let Reocopy = Reocopy - 1' We are finished at this point with this running copy of the macro.This code line will reduce the value indicating the copy number is running since this copy ends in the next line
End Sub




So what was happening there was

First macro starts

For Each ' First Macro Main Loop =====|

First macro pauses if current item is a sub folder
__Second macro starts to look at files in sub folder

__For Each ' Second Macro Main Loop ===|




__Next' Second Macro Main Loop ===|

__Second macro Ends
First macro resumes
Next ' First Macro Main Loop =====|
First macro ends


Lets put that in words, with an example. Let’s say the Main Folder has 3 items
A file
A sub Folder with 4 files in it
A file

The first macro starts.
Loop 1 starts and analyses the first file properties. First loop ends
Loop 2 starts and analyses the Folder properties, then the first macro pauses
__The second macro starts
__Loop 1 analyses the first file in the sub folder. Loop 1 ends
__Loop 2 analyses the second file in the sub folder. Loop 2 ends
__Loop 3 analyses the third file in the sub folder. Loop 3 ends
__Loop 4 analyses the final file in the sub folder. Loop 4 ends
__The second macro ends
The first macro resumes, Loop 2 ends
, and it loops a third time and analyses the third item from main folder, then it ends




The actual coding run will get longer and longer, either
_ If there are increasing numbers of sub folders at any level – in this case a copy code will be used again and again, - This sort of thing
1
__ Copy 2
1
__ Copy 2
1

, and/ or
_ If a sub folder contains itself sub folders – in this case more and more copies are made and affectively pasted in the middle, - This sort of thing
1
__ Copy 2
____ Copy 3
__ Copy 2
1

DocAElstein
09-16-2015, 03:25 PM
This is post#post23768
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23768
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23768



Some macro refinements: Explorer view
Recap: Simple coding
In the simplest initial coding pairs, the second macro presented in each column a file item from the main Movie Maker folder. The results as presented are perhaps as we might perceive them, all as it were, "at the same level".
https://i.postimg.cc/j26gmtNm/Version-2-simple-level-property-Movie-Maker-files-and-sub-folders.jpg
https://i.postimg.cc/j26gmtNm/Version-2-simple-level-property-Movie-Maker-files-and-sub-folders.jpg (https://postimages.org/)

Applying the advanced recursion coding to the same gives this:
https://i.postimg.cc/ZnyR2Mgd/Version-2-advanced-full-levels-property-Movie-Maker-files-and-sub-folders.jpg
https://i.postimg.cc/ct008Xdx/Version-2-advanced-full-levels-property-Movie-Maker-files-and-sub-folders.jpg (https://postimg.cc/ct008Xdx)
https://i.postimg.cc/ZnyR2Mgd/Version-2-advanced-full-levels-property-Movie-Maker-files-and-sub-folders.jpg (https://postimg.cc/ct008Xdx)

That is OK, but it might be helpful if we had some way to get a view more of the windows explorer / "full levels type", whereby we could see more clearly which sub folders or main folder the files and sub folders are in.
https://i.postimg.cc/m2C3FXDk/Explorer-type-levels-view.jpg
https://i.postimg.cc/XpNBRg96/Explorer-type-levels-view.jpg (https://postimg.cc/XpNBRg96)

In general, I find it useful to have some indication, perhaps a simple number count in a number variable, of which copy level of the recursion / reoccurring routine is working at any time. Important to avoid confusion here is that I am not saying here a number to indicate how many times the recursion coding is used, but rather which copy level. In other words a number which both increases in value every time the recursion code is run and decreases every time the current running copy of the recursion coding ends
( We may in addition want to keep another number in a variable that increases every time something is done. In our example this would be the column count, Clm , as we use this to read the results across the page )

Reasons for keeping a count of things:
_ One reason is for debugging purposes: the usual F8 debug step mode can be misleading for the case of a recursion. The reason for this is that we don’t actually ever see the code lines that we are running in step mode, even though that is often said that we do that, and it is easy to believe. We are actually stepping through some low level coding or low level compiled coding that we can’t see, and just for our convenience, the written text of the coding we wrote is highlighted in yellow to give us an idea of what code part is being executed. This can confuse for the case of recursion as we see only being used the same recursion coding text, so we don’t know which copy of the recursion coding is in use, and may think we are always using the same highlighted coding, but this would only be the case if no sub levels ( sub folders in our case ). (Check the coding shown here: (https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23773 ) - In F8 debug step mode, we would not be shown the full coding which is actually used. When in step mode you get to the code line that sets of another copy, what should happen at that point in order to make a clear indication of what is going on, is that another copy appears and you continue going down. But what actually happens is that you appear to jump back to the start of the recursion coding as if you were looping it. That’s wrong. You are not looping it. You are starting a new copy of it whilst you pause the previous one )
_ Another reason is that if the macro is giving you some output in a worksheet, as in our case, then this number can be used to offset the cell used in some way convenient to show the explorer level type structure.


It’s very simple to add the necessary code lines to keep track of this code copy number, and, as I routinely do in recursion coding, I have already put them in
Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variable Reocopy is zero. It will become 1 on first entering the macro. Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use. However, should this macro "Call itself", before its finished , ( the recursion idea ) then the value will be 2 and so on. So effectively it tells us which copy is running at any time


Let Reocopy = Reocopy - 1 ' We are finished at this point with this running copy of the macro. (The next code line ends it). This code line here will reduce the value used to keep track of the copy number being run
End Sub

How to use Reocopy to give a more useful level / code copy output
In my requirement of comparing files (and sub folders and their contents) in a main folder, I would like to have something like a row which I can compare with similar results from another main folder. My results for a single main folder are already over a few rows, so making an offset of a few rows may make considering similar results from other main folders. So I think a single row offset will be adequate. I do note that the offset data will no longer match the property name, but as the different properties are characteristically of different looking forms, I think it will be obvious which properties are showing. What I mean from this last bit is that, for example, it will be obvious that something like this, 2.1.4026.0 , will be the version number, and something like this , 20.12.2002 , will be a date, especially as I know that data in the first two columns is correct and has a similar pattern sequence looking down the rows

I need to do no more than change Rw = 1 + Reocopy + 1 in the second recursion coding to Rw = 1 + Reocopy + 1 to achieve the following modified results , whereby files ( or sub folders) are shown one row below the level of the folder in which they are :
https://i.postimg.cc/R0yjqNDf/Version-2-advanced-full-levels-property-Movie-Maker-files-and-sub-folders-with-Levels-offset.jpg 5728
https://i.postimg.cc/R0yjqNDf/Version-2-advanced-full-levels-property-Movie-Maker-files-and-sub-folders-with-Levels-offset.jpg (https://postimg.cc/p9Q06XxX)


Here is the 3 views comparison:
_ The "one level" view (for just files and sub folders in the ( Movie Maker ) main folder)
_ the full level view ( for all files and sub folders and all contents of sub folders and any further sub folders)
_ the full level view with an offset to help show at what level all the files and sub folders are
https://i.postimg.cc/MGvCWydq/3-view-comparison.jpg 5729
https://i.postimg.cc/MGvCWydq/3-view-comparison.jpg (https://postimg.cc/nsfR29yP)


Here is the full pair of macros , the new recursion coding, Sub ReoccurringFileFolderProps2( , and the macro that calls it. (The calling macro has had no other modification other than changing the name of the recursion macro it calls to Sub ReoccurringFileFolderProps2( )
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23923&viewfull=1#post23923

DocAElstein
09-16-2015, 03:25 PM
This is post#post23769
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23769
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#23769




Some macro refinements: Improved accuracy of Property values
Recap: The windows shell object folder items way
This is potentially a nice ordered way. If all the properties worked it would be great. It seems to have worked well up to XP, but after that both the order of properties listed changed and more and more of them broke. In addition some numbers, in particular size, when working are in some less precise, perhaps rounded KB or MB number, whereas if it is given in a Bytes number, then it appears to be a more precise figure.
( The different size numbers available can also be seen together if you look at a file or folder manually via the Right click --- Property way, https://i.postimg.cc/DwnT0hy7/Movie-Maker-2-Properties-from-Right-Click-Properties-way.jpg
https://eileenslounge.com/viewtopic.php?p=313555#p313555 5730 )

So, looking in particular at the size, issue, but also generally at the file and folder property issue, I took a time out to see if I could come across some other ideas to get properties , for example with this forum post
https://eileenslounge.com/viewtopic.php?p=313622#p313622
https://eileenslounge.com/viewtopic.php?p=313559#p313559

The TLDR outcome of all that is that I will stay with the windows shell object folder items way but also use at some points the Microsoft Scripting Runtime Library way, (commonly also referred to as the FileSystemObject(FSO) way), to get an accurate value of size.

Here is a simple test file to demo what I mean: https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23924&viewfull=1#post23924 this appears initially to give satisfactory results.




More detailed conclusions and discussions
Some concluding thoughts
File Size: accuracy , or rather the value for Alan to use for the purposes of comparing files that may be similar or the same.
At the moment I am firstly interested into getting some consistent results, preferably not rounded, to compare files that are similar or the same. In terms of size, numbers given vary for a particular file, (or folder) , and I have come to the conclusion its best not to ask anyone about converting a Byte to KB or MB or visa versas. If you do ask, then it’s time to hide in a nuclear fallout shelter for a few months, and wait until world war 3 is finished fighting over it. It seems to be down to what definition is your God that you would fight to death for.
The best I can say is that if, as in my used example so far, I see figures for the same file of 628 KB, 629 KB and 647168 Bytes, then it is likely that some rounding has gone on those KB figures so the Byte figure is the best one for my purposes? I would welcome any comments on just this last statement, I mean does it sound a good idea to take, in such a case the 647168 and not worry too much about the other KB or MB number?

_Ways to get the size ( and some other properties maybe )
At the outset of the little project this is related to, I was not so sure what properties I wanted, so after I caught Microsoft Shell Controls And Automation way (windows shell object way) (https://www.youtube.com/watch?v=jTmVtPHtiTg) , I thought great , that’s a pretty full list. Unfortunately by every new Microsoft operating system version both the list order and available properties has changed, and progressively more and more of the property values don’t work – it’s become more broken as time went on. Because of this and because I was narrowing down the list of properties to use, I started looking at other ways.
Conclusions so far about getting the size, and perhaps a few other Properties, comparing the ways
_Built in VBA way, and the VBA Open For Input LOF(1) Close way
I will take a wild guess these two use the same low end coding somewhere. They both give the nice Byte number. But they only work for files. There are not many other properties to get in these ways either
_Microsoft Shell Controls And Automation way (windows shell object way, (WSO))
A bit broken and inconsistent as time goes on, but using this in XP can give some other properties that I can’t seem to get in any other way. For a file we have a couple of ways within the Microsoft Shell Controls And Automation way (windows shell object way). The Item.Sizeproperty gives the nice long figure Byte number, and the objFolder.GetDetailsOf(Item, 1) gives the shorter KB or MB figure, which I presume is rounded. It appears that if the item is a folder, then both these size things are broken, even as far back as XP. The size property gives zero and the GetDetailsOf method
(I note that in any explorer window I have ever seen the folder property never works. I don’t know if there is any connection there?)
_ This seems to be the only way so far to get me a folder size programmatically with VBA. The file size given is the nice full digits Bytes, as it is also for the files size. So this might be the one to use for size

_._______________

So for the time being, in ouder to move on, the macro so far, the recursion / reoccurring one will be modified a bit, mostly to get the accurate and working size property given by the WSO way
See around
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)/page17
https://eileenslounge.com/viewtopic.php?p=313792#p313792
https://eileenslounge.com/viewtopic.php?f=30&t=40533&p=313792#p313792
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)/page18

DocAElstein
09-16-2015, 03:25 PM
c,,cbs


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://eileenslounge.com/viewtopic.php?p=317218#p317218 (https://eileenslounge.com/viewtopic.php?p=317218#p317218)
https://eileenslounge.com/viewtopic.php?p=316955#p316955 (https://eileenslounge.com/viewtopic.php?p=316955#p316955)
https://eileenslounge.com/viewtopic.php?p=316955#p316955 (https://eileenslounge.com/viewtopic.php?p=316955#p316955)
https://eileenslounge.com/viewtopic.php?p=316940#p316940 (https://eileenslounge.com/viewtopic.php?p=316940#p316940)
https://eileenslounge.com/viewtopic.php?p=316927#p316927 (https://eileenslounge.com/viewtopic.php?p=316927#p316927)
https://eileenslounge.com/viewtopic.php?p=317014#p317014 (https://eileenslounge.com/viewtopic.php?p=317014#p317014)
https://eileenslounge.com/viewtopic.php?p=317006#p317006 (https://eileenslounge.com/viewtopic.php?p=317006#p317006)
https://eileenslounge.com/viewtopic.php?p=316935#p316935 (https://eileenslounge.com/viewtopic.php?p=316935#p316935)
https://eileenslounge.com/viewtopic.php?p=316875#p316875 (https://eileenslounge.com/viewtopic.php?p=316875#p316875)
https://eileenslounge.com/viewtopic.php?p=316254#p316254 (https://eileenslounge.com/viewtopic.php?p=316254#p316254)
https://eileenslounge.com/viewtopic.php?p=316280#p316280 (https://eileenslounge.com/viewtopic.php?p=316280#p316280)
https://eileenslounge.com/viewtopic.php?p=315915#p315915 (https://eileenslounge.com/viewtopic.php?p=315915#p315915)
https://eileenslounge.com/viewtopic.php?p=315512#p315512 (https://eileenslounge.com/viewtopic.php?p=315512#p315512)
https://eileenslounge.com/viewtopic.php?p=315744#p315744 (https://eileenslounge.com/viewtopic.php?p=315744#p315744)
https://www.eileenslounge.com/viewtopic.php?p=315512#p315512 (https://www.eileenslounge.com/viewtopic.php?p=315512#p315512)
https://eileenslounge.com/viewtopic.php?p=315680#p315680 (https://eileenslounge.com/viewtopic.php?p=315680#p315680)
https://eileenslounge.com/viewtopic.php?p=315743#p315743 (https://eileenslounge.com/viewtopic.php?p=315743#p315743)
https://www.eileenslounge.com/viewtopic.php?p=315326#p315326 (https://www.eileenslounge.com/viewtopic.php?p=315326#p315326)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40752 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40752)
https://eileenslounge.com/viewtopic.php?p=314950#p314950 (https://eileenslounge.com/viewtopic.php?p=314950#p314950)
https://www.eileenslounge.com/viewtopic.php?p=314940#p314940 (https://www.eileenslounge.com/viewtopic.php?p=314940#p314940)
https://www.eileenslounge.com/viewtopic.php?p=314926#p314926 (https://www.eileenslounge.com/viewtopic.php?p=314926#p314926)
https://www.eileenslounge.com/viewtopic.php?p=314920#p314920 (https://www.eileenslounge.com/viewtopic.php?p=314920#p314920)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
08-29-2023, 10:47 PM
A,jdcDS;HS

lateragain









https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=oVb1RfcSHLM&lc=UgwTq-jZlZLnLQ5VB8Z4AaABAg.9Hroz-OyWog9tYjSMc1qjA (https://www.youtube.com/watch?v=oVb1RfcSHLM&lc=UgwTq-jZlZLnLQ5VB8Z4AaABAg.9Hroz-OyWog9tYjSMc1qjA)
https://www.youtube.com/watch?v=0pbsf6sox34&lc=Ugxp9JFvvejnqA68W1t4AaABAg (https://www.youtube.com/watch?v=0pbsf6sox34&lc=Ugxp9JFvvejnqA68W1t4AaABAg)
https://www.youtube.com/watch?v=kfQC-sQxMcw&lc=UgyCxQWypNIhG2nUn794AaABAg.9q1p6q7ah839tUQl_92m vg (https://www.youtube.com/watch?v=kfQC-sQxMcw&lc=UgyCxQWypNIhG2nUn794AaABAg.9q1p6q7ah839tUQl_92m vg)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgyOh-eR43LvlIJLG5p4AaABAg.9isnKJoRfbL9itPC-4uckb (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgyOh-eR43LvlIJLG5p4AaABAg.9isnKJoRfbL9itPC-4uckb)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugy1B1aQnHq2WbbucmR4AaABAg.9isY3Ezhx4j9itQLuif2 6T (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugy1B1aQnHq2WbbucmR4AaABAg.9isY3Ezhx4j9itQLuif2 6T)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgxxajSt03TX1wxh3IJ4AaABAg.9irSL7x4Moh9itTRqL7d Qh (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgxxajSt03TX1wxh3IJ4AaABAg.9irSL7x4Moh9itTRqL7d Qh)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgwJAAPbp8dhkW2X1Uh4AaABAg.9iraombnLDb9itV80HDp Xc (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgwJAAPbp8dhkW2X1Uh4AaABAg.9iraombnLDb9itV80HDp Xc)
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgzIzQ6MQ5kTpuLbIuB4AaABAg.9is0FSoF2Wi9itWKEvGS Sq (https://www.youtube.com/watch?v=vXyMScSbhk4&lc=UgzIzQ6MQ5kTpuLbIuB4AaABAg.9is0FSoF2Wi9itWKEvGS Sq)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iK75iCEaGN (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iK75iCEaGN)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iK7XF33njy (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iK7XF33njy)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iKCSgpAqA1 (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iKCSgpAqA1)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iKCy--3x8E (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iKCy--3x8E)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwNaJiNATXshvJ0Zz94AaABAg.9iEktVkTAHk9iF9_pdsh r6 (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwNaJiNATXshvJ0Zz94AaABAg.9iEktVkTAHk9iF9_pdsh r6)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iFAZq-JEZ- (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgykemWTw-fGoPwu8E14AaABAg.9iECYNx-n4U9iFAZq-JEZ-)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgxV2r7KQnuAyZVLHH54AaABAg.9iDVgy6wzct9iFBxma9z XI (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgxV2r7KQnuAyZVLHH54AaABAg.9iDVgy6wzct9iFBxma9z XI)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwnYuSngiuYaUhEMWN4AaABAg.9iDQN7TORHv9iFGQQ5z_ 3f (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwnYuSngiuYaUhEMWN4AaABAg.9iDQN7TORHv9iFGQQ5z_ 3f)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwJ3yzdk_EE98dndmt4AaABAg.9iDLC2uEPRW9iFGvgk11 nH (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwJ3yzdk_EE98dndmt4AaABAg.9iDLC2uEPRW9iFGvgk11 nH)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgyDWAVqCa4yMot463x4AaABAg.9iH3wvUZj3n9iHnpOxOe Xa (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgyDWAVqCa4yMot463x4AaABAg.9iH3wvUZj3n9iHnpOxOe Xa)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwvLFdMEAba5rLHIz94AaABAg.9iGReNGzP4v9iHoeaCpT G8 (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=UgwvLFdMEAba5rLHIz94AaABAg.9iGReNGzP4v9iHoeaCpT G8)
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iHpsWCdJ5I (https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugy_1xkcndYdzUapw-J4AaABAg.9iGOq_leF_E9iHpsWCdJ5I)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

KJHDHkj

DocAElstein
01-17-2024, 03:09 AM
Some extra notes for these forum Threads and posts
http://www.eileenslounge.com/viewtopic.php?f=39&p=313468#p313468
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23774




Option Explicit
Dim Clm As Long, Reocopy As Long ' variable for column number to put file or folder details in, number representin the copy of the second macro

' Select the cell where a main folder(s) last bit of its Parf will go. This macro will list, starting with the folder name under that patf bit, a few property names. In the naxt column the corresponding property value will be given
'
Sub PassFolderForReocursing1()
'Sub SchellFolderDetails2() ' Jan 2024 https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23775
Rem 0
Let Clm = 0: Reocopy = -1
Rem 1
Dim Ws As Worksheet: Set Ws = Me ' G:\YouTubeVideos&Anaslysis&HackingTricks\VideoRecordingEditing\Windows (Live) Movie Maker\Movie Maker Versions.xls
' 1b
Dim Parf As String
Let Parf = ThisWorkbook.Path & "\Versions Downloads Exes\Verson 2, 2 1 2 5 Downloads 2,1\50 Euro Keks"
Let Parf = ThisWorkbook.Path & "\50 Euro Keks"
' 1c
If Len(Parf) - Len(Replace(Parf, "\", "", 1, -1, vbBinaryCompare)) >= 2 Then
Let ActiveCell = Mid(Parf, InStrRev(Parf, "\", InStrRev(Parf, "\", -1, vbBinaryCompare) - 1, vbBinaryCompare))
Else
Let ActiveCell = Parf
End If
Rem 2 Windows Shell object
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Parf) '
Rem 3 Movie Maker Folder Property names and Property values.
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' We loop through all items to find the Movie Maker folder ' =======
If Fil.Name = "Movie Maker" Then
Dim Rw As Long: Let Rw = 1
'Let ActiveCell.Offset(Rw, 0) = "Name": Let ActiveCell.Offset(Rw, 1) = objFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw, 0) = objFolder.GetDetailsOf("Goolies", 0): Let ActiveCell.Offset(Rw, 1) = objFolder.GetDetailsOf(Fil, 0)
'Let ActiveCell.Offset(Rw + 1, 0) = "Größe": Let ActiveCell.Offset(Rw + 1, 1) = objFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 1, 0) = objFolder.GetDetailsOf(71, 1): Let ActiveCell.Offset(Rw + 1, 1) = objFolder.GetDetailsOf(Fil, 1)
'Let ActiveCell.Offset(Rw + 2, 0) = "Elementtyp": Let ActiveCell.Offset(Rw + 2, 1) = objFolder.GetDetailsOf(Fil, 2)
Let ActiveCell.Offset(Rw + 2, 0) = objFolder.GetDetailsOf(Parf, 2): Let ActiveCell.Offset(Rw + 2, 1) = objFolder.GetDetailsOf(Fil, 2)
'Let ActiveCell.Offset(Rw + 3, 0) = "Änderungsdatum": Let ActiveCell.Offset(Rw + 3, 1) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 3, 0) = objFolder.GetDetailsOf(Ws, 3): Let ActiveCell.Offset(Rw + 3, 1) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
'Let ActiveCell.Offset(Rw + 4, 0) = "Erstelldatum": Let ActiveCell.Offset(Rw + 4, 1) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, 0) = objFolder.GetDetailsOf(Left("gh", 2), 4): Let ActiveCell.Offset(Rw + 4, 1) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, 0) = objFolder.GetDetailsOf("Bum", 166): Let ActiveCell.Offset(Rw + 5, 1) = objFolder.GetDetailsOf(Fil, 166)

Rem 4
ActiveCell.Offset(0, 2).Activate
' 4b
Call ReoccurringFileFolderProps(Parf & "\Movie Maker")
Exit For ' Once we have passed on the full path of the folder, Movie Maker , then we are finished with this macro, so we don't need loop further looking fot the Movie Maker folder
Else
End If
Next Fil ' ================================================== =========================================
End Sub

' https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23774
Private Sub ReoccurringFileFolderProps(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variable Reocopy is zero. It will become 1 on first entering the macro. Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use. However, should this macro "Call itself", before its finished , ( the recursion idea ) then the vallue will be 2 and so on. So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf) '
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2)
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166)
'_________________________________________________ ________________________________________________
' 2b Here we may pause the macro, whilst another copy of it is started
If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner" Then Call ReoccurringFileFolderProps(Pf & "\" & objFolder.GetDetailsOf(Fil, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the abobe code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next Fil ' ============================== Main Loop =================================================|


Let Reocopy = Reocopy - 1 ' We are finished at this point with this running copy of the macro. This code line will reduce the v
End Sub

DocAElstein
01-17-2024, 05:35 PM
Some extra notes for these forum Threads and posts
https://eileenslounge.com/viewtopic.php?f=30&t=40533
http://www.eileenslounge.com/viewtopic.php?f=39&p=313468#p313468
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23774



https://i.postimg.cc/WbTKVfVC/Get-File-size-manually.jpg
https://i.postimg.cc/Z5DDrbNz/Hover-Over-gotten-File-Size.jpg
https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
https://i.postimg.cc/XvRHzsx2/Right-click-properties-gotten-File-Size.jpg
https://i.postimg.cc/sg2NQQvJ/Size-shown-in-explorer.jpg
https://i.postimg.cc/PqpVygbp/Hover-Over-gotten-File-Size.jpg
https://i.postimg.cc/vHhKZLHB/Size-shown-in-explorer.jpg




https://i.postimg.cc/WbTKVfVC/Get-File-size-manually.jpg (https://postimages.org/)

https://i.postimg.cc/Z5DDrbNz/Hover-Over-gotten-File-Size.jpg (https://postimages.org/)

https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg (https://postimages.org/)

https://i.postimg.cc/XvRHzsx2/Right-click-properties-gotten-File-Size.jpg (https://postimages.org/)

https://i.postimg.cc/sg2NQQvJ/Size-shown-in-explorer.jpg (https://postimages.org/)

https://i.postimg.cc/PqpVygbp/Hover-Over-gotten-File-Size.jpg (https://postimg.cc/rdT9FYPM)

https://i.postimg.cc/vHhKZLHB/Size-shown-in-explorer.jpg (https://postimg.cc/RN3dPtt5)

DocAElstein
01-18-2024, 10:41 PM
Some extra notes for this forum post: https://eileenslounge.com/viewtopic.php?f=30&t=40533&p=313578#p313578

I took a look at this (https://i.postimg.cc/WzMqvLVX/snbsize.jpg)
https://i.postimg.cc/64pprPyv/snbsize.jpg (https://postimg.cc/64pprPyv)


Here is the test file and folder details https://i.postimg.cc/pX90bM2Q/MM-Property-Test-Folder.jpg https://i.postimg.cc/2SN78v0H/MM-Property-Test-Folder.jpg
https://i.postimg.cc/N5c8mV2L/MM-Property-Test-Folder.jpg (https://postimg.cc/N5c8mV2L) https://i.postimg.cc/ZCjdw9t3/MM-Property-Test-Folder.jpg (https://postimg.cc/ZCjdw9t3)

Sample File ___ sample.wmv https://app.box.com/s/leu06ql1fu9uzt59wnoizedg85qoo7k4
Folder ___ MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v
File with coding in ___ Movie Maker Versions.xls https://app.box.com/s/axle7nflnmgkfbztto1wsmhc2ml2ynes
' c009 Built in VBA FileLen( ) way , ' c109 Scripting Runtime Object Library way

Sub SumSnbs_() ' http://www.eileenslounge.com/viewtopic.php?p=313578#p313578 https://www.snb-vba.eu/VBA_Bestanden.html#L_2.17
Dim FileThing As Variant, FolderThing As Variant, FlFldrNme As String
' c009 Built in VBA FileLen( ) way
Let FlFldrNme = Dir(PathName:=ThisWorkbook.Path & Application.PathSeparator & "*", Attributes:=vbDirectory + vbNormal)
Do While Left(FlFldrNme, 1) = "." ' https://www.accessforums.net/showthread.php?t=60879&p=325335#post325335
Let FlFldrNme = Dir
Loop ' While Left(FlFldrNme, 1) = "."
Do While FlFldrNme <> ""
Debug.Print FlFldrNme & " ";
Let FileThing = FileLen(ThisWorkbook.Path & "\" & FlFldrNme) ' VBA built in way
If FileThing = 0 Then ' Probably got a Folder
' c109 Scripting Runtime Object Library way
Let FolderThing = CreateObject("scripting.filesystemobject").GetFolder(ThisWorkbook.Path & "\" & FlFldrNme).Size
Debug.Print FolderThing
Else ' Probably got a file
Debug.Print FileThing & " "; ' VBA built in way
Let FileThing = CreateObject("scripting.filesystemobject").GetFile(ThisWorkbook.Path & "\" & FlFldrNme).Size
Debug.Print FileThing ' c109 Scripting Runtime Object Library way
End If
Let FlFldrNme = Dir
Loop ' While vTemp <> ""
End Sub
Results:

sample.wmv 643170 643170
Microsoft Scripting Runtime Library referrence.JPG 96231 96231
snbsize.JPG 96857 96857
Windows Script Host Object Model Library referrence.JPG 85009 85009
MySubFolder 96857
Movie Maker Versions.xls 1630720 1630720
Conclusions:
Both the in-built VBA file size function and the file size from scripting file system object appear to give a nice Bytes size number
The folder size from the scripting file system object gives a similar number. (Note that in the folder, MySubFolder, is a single file, snbsize.JPG, and I also ran the code with nothing in MySubFolder and got a size of 0. So it would appear that an empty folder has a size of the things in it.



' c309 Microsoft Shell Controls And Automation way


Sub MicrosoftShellControlsAndAutomation() ' referrence Microsoft Shell Controls And Automation 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
' c309 Microsoft Shell Controls And Automation way
Dim oShell As Shell32.Shell: Set oShell = New Shell32.Shell
Dim Itm As Shell32.FolderItem, objFolder As Shell32.Folder: Set objFolder = oShell.Namespace(ThisWorkbook.Path)
For Each Itm In objFolder.Items
Debug.Print Itm.Name & " " & Itm.Size & " " & objFolder.GetDetailsOf(Itm, 1)
Next Itm
End Sub
Results:
sample.wmv 643170 628 KB
Microsoft Scripting Runtime Library referrence.JPG 96231 93,9 KB
snbsize.JPG 96857 94,5 KB
Windows Script Host Object Model Library referrence.JPG 85009 83,0 KB
MySubFolder 0
Movie Maker Versions.xls 1630720 1,55 MB
Conclusion:
The .size and .GetDetailsOf(Itm, 1) seem to give different numbers and the .size looks like the nice number
It seems to be broken for a folder. The .size gives 0 and the .GetDetailsOf(Itm, 1) gives nothing



' c709 VBA Open For Input Close way


' c709 VBA Open For Input Close way
Sub c709() ' https://www.snb-vba.eu/VBA_Bestanden.html#L_2.17 Size: file size / file length in bytes
Dim vTemp As Variant
Open ThisWorkbook.Path & "\" & "sample.wmv" For Input As #1
Let vTemp = LOF(1): Debug.Print vTemp ' 643170
Close

'Open ThisWorkbook.Path & "\" & "MySubFolder" For Input As #1 ' Does not work for Folders
' Let vTemp = LOF(1): Debug.Print vTemp
'Close
End Sub
Result:
643170
Conclusions
For a file, this returns the nice Byte number. (It does not work for a folder)



The final way suggested by snb, the Windows Script Host Object Model look like it needs some more consideration, so I will look at that in the next post, https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23918&viewfull=1#post23918

DocAElstein
01-19-2024, 01:53 AM
' c509 c609 Windows Script Host Object Model

This does not initially seem to be doing what it was supposed to. It’s not giving any properties. For the case of a file it returns a simple string of that file. For the case of a folder it lists all in the folder


' c509 c609 Windows Script Host Object Model
Sub WindowsScriptHostObjectModel() ' referrence Windows Script Host Object Model https://i.postimg.cc/k5FnwWrH/Windows-Script-Host-Object-Model-Library-referrence.jpg
Dim wsh As WshShell: Set wsh = New WshShell
Dim CmdString As String: Let CmdString = "cmd /c Dir " & Chr(34) & ThisWorkbook.Path & "\" & "sample.wmv" & Chr(34) & " /b": ' Debug.Print CmdString
Dim vTemp As Variant
Let vTemp = wsh.Exec(CmdString).StdOut.ReadAll
' Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(vTemp) ' vTemp is "sample" & "." & "wmv" & vbCr & vbLf
' c509 c609
Let vTemp = CreateObject("wscript.shell").Exec(CmdString).StdOut.ReadAll
' Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(vTemp) ' vTemp is "sample" & "." & "wmv" & vbCr & vbLf
Let vTemp = Split(vTemp, vbCr & vbLf) ' Watch : - : vTemp : : Variant/String(0 to 1) : Tabelle4.WindowsScriptHostObjectModel https://i.postimg.cc/JhWrbPFJ/Split-v-Temp-vb-Cr-vb-Lf.jpg
End Sub
Sub WindowsScriptHostObjectModel_() ' referrence Windows Script Host Object Model https://i.postimg.cc/k5FnwWrH/Windows-Script-Host-Object-Model-Library-referrence.jpg
Dim FlFldrNme As String, vTemp As Variant
Let FlFldrNme = Dir(PathName:=ThisWorkbook.Path & Application.PathSeparator & "*", Attributes:=vbDirectory + vbNormal)
Do While Left(FlFldrNme, 1) = "." ' https://www.accessforums.net/showthread.php?t=60879&p=325335#post325335
Let FlFldrNme = Dir
Loop ' While Left(FlFldrNme, 1) = "."
' a) Loop through all files and folders in the main folder in the Command line string
Do While FlFldrNme <> ""
Debug.Print FlFldrNme & vbCr & vbLf
' c509 c609
Dim CmdString As String: Let CmdString = "cmd /c Dir " & Chr(34) & ThisWorkbook.Path & "\" & FlFldrNme & Chr(34) & " /b" ' : Debug.Print CmdString
Let vTemp = CreateObject("wscript.shell").Exec(CmdString).StdOut.ReadAll
'Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(vTemp) ' vTemp is "sample" & "." & "wmv" & vbCr & vbLf
Debug.Print vTemp
Let FlFldrNme = Dir
Loop ' While vTemp <> ""

Debug.Print: Debug.Print
' b) use the main folder in the Command line string
Let CmdString = "cmd /c Dir " & Chr(34) & ThisWorkbook.Path & Chr(34) & " /b" ' : Debug.Print CmdString
Let vTemp = CreateObject("wscript.shell").Exec(CmdString).StdOut.ReadAll
'Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(vTemp) ' vTemp is "sample" & "." & "wmv" & vbCr & vbLf
Debug.Print vTemp
End Sub
Results ' a) (Sub WindowsScriptHostObjectModel_() )

sample.wmv

sample.wmv

Microsoft Scripting Runtime Library referrence.JPG

Microsoft Scripting Runtime Library referrence.JPG

snbsize.JPG

snbsize.JPG

Windows Script Host Object Model Library referrence.JPG

Windows Script Host Object Model Library referrence.JPG

MySubFolder

snbsize.JPG

Movie Maker Versions.xls

Movie Maker Versions.xls
For the case of a file it returns a simple string of that file. For the case of a folder it lists all in the folder




Results ' b) (Sub WindowsScriptHostObjectModel_() )

sample.wmv
Microsoft Scripting Runtime Library referrence.JPG
snbsize.JPG
Windows Script Host Object Model Library referrence.JPG
MySubFolder
Movie Maker Versions.xls
For the case of the main folder, all the files and folders in the main folder are listed






folder details https://i.postimg.cc/pX90bM2Q/MM-Property-Test-Folder.jpg https://i.postimg.cc/2SN78v0H/MM-Property-Test-Folder.jpg
https://i.postimg.cc/N5c8mV2L/MM-Property-Test-Folder.jpg (https://postimg.cc/N5c8mV2L) https://i.postimg.cc/ZCjdw9t3/MM-Property-Test-Folder.jpg (https://postimg.cc/ZCjdw9t3)

Sample File ___ sample.wmv https://app.box.com/s/leu06ql1fu9uzt59wnoizedg85qoo7k4
Folder ___ MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v
File with coding in ___ Movie Maker Versions.xls https://app.box.com/s/axle7nflnmgkfbztto1wsmhc2ml2ynes

DocAElstein
01-20-2024, 06:30 PM
for later


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.eileenslounge.com/viewtopic.php?f=44&t=40455&p=313035#p313035 (https://www.eileenslounge.com/viewtopic.php?f=44&t=40455&p=313035#p313035)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312889#p312889 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312889#p312889)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312886#p312886 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312886#p312886)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312752#p312752 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312752#p312752)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312734#p312734 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312734#p312734)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312727#p312727 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312727#p312727)
https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312724#p312724 (https://www.eileenslounge.com/viewtopic.php?f=18&t=40411&p=312724#p312724)
https://www.eileenslounge.com/viewtopic.php?f=44&t=40374&p=312535#p312535 (https://www.eileenslounge.com/viewtopic.php?f=44&t=40374&p=312535#p312535)
https://www.eileenslounge.com/viewtopic.php?p=312533#p312533 (https://www.eileenslounge.com/viewtopic.php?p=312533#p312533)
https://www.eileenslounge.com/viewtopic.php?f=44&t=40373&p=312499#p312499 (https://www.eileenslounge.com/viewtopic.php?f=44&t=40373&p=312499#p312499)
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg.9xhyRrsUUOM9xpn-GDkL3o (https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg.9xhyRrsUUOM9xpn-GDkL3o)
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg (https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg)
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg (https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg)
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg.9zYoeePv8sZ9zYqog9KZ 5B (https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg.9zYoeePv8sZ9zYqog9KZ 5B)
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg.9xhyRrsUUOM9zYlZPKdO pm (https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg.9xhyRrsUUOM9zYlZPKdO pm)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
01-20-2024, 06:37 PM
Some more notes for these main forum posts
https://eileenslounge.com/viewtopic.php?p=313622#p313622
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23776

https://i.postimg.cc/SQLdw105/Version-2-Files.jpg
https://i.postimg.cc/SQLdw105/Version-2-Files.jpg (https://postimages.org/)

The basic coding to get the initial results as shown above
What looked potentially a useful coding way I got from this good source, https://www.youtube.com/watch?v=jTmVtPHtiTg . Summarised, the coding there treats things, (I think probably everything, Folders and files), in a folder as Items of that folder. You loop through those items, and are able to get a lot of properties for each one. Each property is returned from a code line of this general form PropertyValue = objFolder.GetDetailsOf(Fil, 166) (For want of a better descriptions I will refer to this as the windows shell object way)

The basic looping structure would then be of this sort of form
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(FullPathToFolder) '
Dim Fil As Shell32.FolderItem
__For Each Fil In objFolder.Items
___PropertyValue = objFolder.GetDetailsOf(Fil, 166)

__Next Fil
So , briefly, Fil is declared as a folder Item, and we loop through each of them in the folder. At each loop we can get a particular property from a number. In that example I have 166, which so far always seems to give me a version number.
To get the full listing of the numbers for the different properties available, see here https://www.youtube.com/watch?v=jTmVtPHtiTg&t=560s
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=UgzlC5LBazG6SMDP4nl4AaABAg.9zYoeePv8sZ9zYqog9KZ 5B
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg.9xhyRrsUUOM9zYlZPKdO pm


Full coding example
As time went on, I chopped and changed the basic coding quite a bit to suit getting a better comparison of the Movie Maker folder contents. So this is just one early working example. The example is for the earliest version of Movie Maker that I could find, version 2
In the uploaded workbook , Movie Maker Versions.xls , the coding given in this and the next post are towards the top of Worksheets Version 2 code module
Initially I did 2 macros. The first, below analyses the main Movie Maker Folder. It makes 2 columns, the first gives the property names and in the second column it attempts to give the properties.
The Movie Maker main program folder is also uploaded.
Basically the macro loops through all items in the same folder as you put the Excel file containing the macro, Movie Maker Versions.xls. There is a Stop in the coding, so that you can resume if necessary until you hit the Movie Maker

Select top left where you want the results to start, and run Sub Schell2ColumnMovieMakerFolderDetails()

For example I selected cell A3 and ran the macro Sub Schell2ColumnMovieMakerFolderDetails()


https://i.postimg.cc/ZRR7ZRBz/Version-2-simple-property-macro-Movie-Maker-folder-analysis.jpg
https://i.postimg.cc/jWpQ4R4M/Version-2-simple-property-macro-Movie-Maker-folder-analysis.jpg (https://postimg.cc/jWpQ4R4M)5727




' Select top left of where Folder details should start. Folder details will be for all items that are in the Folder at the Parf string There is a Stop so you can resume until you get the Movie Maker folder
Private Sub Schell2ColumnMovieMakerFolderDetails() ' https://www.youtube.com/watch?v=jTmVtPHtiTg&t=612s
Dim Ws As Worksheet: Set Ws = Me
' Windows (Live) Movie Maker archive org details wmm2installer\Jewano Install Dec 5 2023
Dim Parf As String
Let Parf = ThisWorkbook.Path ' To test coding, put the Movie Maker main programs folder
Dim objShell As Shell32.Shell: 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.jpg
Dim ObjFolder As Shell32.Folder: Set ObjFolder = objShell.Namespace(Parf)
Dim Fil As Shell32.FolderItem
For Each Fil In ObjFolder.Items
Dim Rw As Long: Let Rw = 1 ': Let Rw = Rw + 1
Let ActiveCell.Offset(Rw, 0) = "Name": Let ActiveCell.Offset(Rw, 1) = ObjFolder.GetDetailsOf(Fil, 0)
' Or to check the property name
Let ActiveCell.Offset(Rw, 0) = ObjFolder.GetDetailsOf("Anything", 0): Let ActiveCell.Offset(Rw, 1) = ObjFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw + 1, 0) = "Größe": Let ActiveCell.Offset(Rw + 1, 1) = ObjFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 2, 0) = "Elementtyp": Let ActiveCell.Offset(Rw + 2, 1) = ObjFolder.GetDetailsOf(Fil, 2)
Let ActiveCell.Offset(Rw + 3, 0) = "Änderungsdatum": Let ActiveCell.Offset(Rw + 3, 1) = Left(ObjFolder.GetDetailsOf(Fil, 3), InStr(1, ObjFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, 0) = "Erstelldatum": Let ActiveCell.Offset(Rw + 4, 1) = Left(ObjFolder.GetDetailsOf(Fil, 4), InStr(1, ObjFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 5, 0) = "Abmessungen": Let ActiveCell.Offset(Rw + 5, 1) = ObjFolder.GetDetailsOf(Fil, 31)
Let ActiveCell.Offset(Rw + 6, 0) = "Gesamtgröße": Let ActiveCell.Offset(Rw + 6, 1) = ObjFolder.GetDetailsOf(Fil, 57)
Let ActiveCell.Offset(Rw + 7, 0) = "Dateierweiterung": Let ActiveCell.Offset(Rw + 7, 1) = ObjFolder.GetDetailsOf(Fil, 164)
Let ActiveCell.Offset(Rw + 8, 0) = "Dateiname": Let ActiveCell.Offset(Rw + 8, 1) = ObjFolder.GetDetailsOf(Fil, 165)
Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = ObjFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 10, 0) = "Gesamtdateigröße": Let ActiveCell.Offset(Rw + 10, 1) = ObjFolder.GetDetailsOf(Fil, 309)
Let ActiveCell.Offset(Rw + 11, 0) = "Videokomprimierung": Let ActiveCell.Offset(Rw + 11, 1) = ObjFolder.GetDetailsOf(Fil, 311)
Let ActiveCell.Offset(Rw + 12, 0) = "Regisseure": Let ActiveCell.Offset(Rw + 12, 1) = ObjFolder.GetDetailsOf(Fil, 312)
Let ActiveCell.Offset(Rw + 13, 0) = "Datenrate": Let ActiveCell.Offset(Rw + 13, 1) = ObjFolder.GetDetailsOf(Fil, 313)
Let ActiveCell.Offset(Rw + 14, 0) = "Bildhöhe": Let ActiveCell.Offset(Rw + 14, 1) = ObjFolder.GetDetailsOf(Fil, 314)
Let ActiveCell.Offset(Rw + 15, 0) = "Einzelbildrate": Let ActiveCell.Offset(Rw + 15, 1) = ObjFolder.GetDetailsOf(Fil, 315)
Let ActiveCell.Offset(Rw + 16, 0) = "Bildbreite": Let ActiveCell.Offset(Rw + 16, 1) = ObjFolder.GetDetailsOf(Fil, 316)
Let ActiveCell.Offset(Rw + 17, 0) = "Kugelförmig": Let ActiveCell.Offset(Rw + 17, 1) = ObjFolder.GetDetailsOf(Fil, 317)
Let ActiveCell.Offset(Rw + 18, 0) = "Stereo": Let ActiveCell.Offset(Rw + 10, 1) = ObjFolder.GetDetailsOf(Fil, 309)
Let ActiveCell.Offset(Rw + 19, 0) = "Videoausrichtung": Let ActiveCell.Offset(Rw + 19, 1) = ObjFolder.GetDetailsOf(Fil, 319)
Let ActiveCell.Offset(Rw + 20, 0) = "Gesamtbitrate": Let ActiveCell.Offset(Rw + 20, 1) = ObjFolder.GetDetailsOf(Fil, 320)
Stop ' In case you got the wrong folder - keep hitting Play button or F5 until the folder you want is found
Next Fil
End Sub





Movie Maker https://app.box.com/s/cxvc735a85q6az2r3gtb7ii9w2p3jzpf
Movie Maker Versions.xls https://app.box.com/s/axle7nflnmgkfbztto1wsmhc2ml2ynes

DocAElstein
01-20-2024, 09:56 PM
As example, after running the macro in the last post (https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23920&viewfull=1#post23920), in the same worksheet, select cell D3 and run the macro below. Details of the file should be added.

https://i.postimg.cc/g2y0C2qk/Version-2-simple-property-macro-for-Movie-Maker-files.jpg
https://i.postimg.cc/fVLZXZr6/Version-2-simple-property-macro-for-Movie-Maker-files.jpg (https://postimg.cc/fVLZXZr6)5726



' Select top left of where File details should start, usually column D
Private Sub FolderFileDetails() ' https://www.youtube.com/watch?v=jTmVtPHtiTg&t=612s
Dim Ws As Worksheet: Set Ws = Me
Dim Parf As String
Let Parf = ThisWorkbook.Path & "\Movie Maker"
Dim objShell As Shell32.Shell: 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.jpg
Dim ObjFolder As Shell32.Folder: Set ObjFolder = objShell.Namespace(Parf)
Dim Fil As Shell32.FolderItem
For Each Fil In ObjFolder.Items
Dim Clm As Long: Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1
Let ActiveCell.Offset(Rw, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw + 1, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 2, Clm - 1) = Replace(ObjFolder.GetDetailsOf(Fil, 2), "Anwendungserweiterung", "App Ext", 1, 1, vbBinaryCompare)
Let ActiveCell.Offset(Rw + 3, Clm - 1) = Left(ObjFolder.GetDetailsOf(Fil, 3), InStr(1, ObjFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, Clm - 1) = Left(ObjFolder.GetDetailsOf(Fil, 4), InStr(1, ObjFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 5, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 31)
Let ActiveCell.Offset(Rw + 6, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 57)
Let ActiveCell.Offset(Rw + 7, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 164)
Let ActiveCell.Offset(Rw + 8, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 165)
Let ActiveCell.Offset(Rw + 9, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 10, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 309)
Let ActiveCell.Offset(Rw + 11, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 311)
Let ActiveCell.Offset(Rw + 12, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 312)
Let ActiveCell.Offset(Rw + 13, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 313)
Let ActiveCell.Offset(Rw + 14, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 314)
Let ActiveCell.Offset(Rw + 15, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 315)
Let ActiveCell.Offset(Rw + 16, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 316)
Let ActiveCell.Offset(Rw + 17, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 317)
Let ActiveCell.Offset(Rw + 18, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 309)
Let ActiveCell.Offset(Rw + 19, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 319)
Let ActiveCell.Offset(Rw + 20, Clm - 1) = ObjFolder.GetDetailsOf(Fil, 320)
'Stop ' Stop after each file
Next Fil
End Sub




https://i.postimg.cc/g2y0C2qk/Version-2-simple-property-macro-for-Movie-Maker-files.jpg (https://postimages.org/)

DocAElstein
01-22-2024, 02:56 AM
later

For later use

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg (https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgxsozCmRd3RAmIPO5B4AaABAg.9fxrOrrvTln9g9wr8mv2 CS (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgxsozCmRd3RAmIPO5B4AaABAg.9fxrOrrvTln9g9wr8mv2 CS)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g96yGbAX 4t (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g96yGbAX 4t)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9g7pczEpcTz (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9g7pczEpcTz)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g7lhoX-ar5 (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g7lhoX-ar5)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gD0AA-sfpl (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gD0AA-sfpl )
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gECpsAVGbh (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gECpsAVGbh)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg.9g9wJCunNRa9gJGhDZ4R I2 (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg.9g9wJCunNRa9gJGhDZ4R I2)
https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugz-pow-E8FDG8gFZ4l4AaABAg.9f8Bng22e5d9f8hoJGZY-5 (https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugz-pow-E8FDG8gFZ4l4AaABAg.9f8Bng22e5d9f8hoJGZY-5)
https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxev2gQt7BKZ0WYMfh4AaABAg.9f6hAjkC0ct9f8jleOui-u (https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxev2gQt7BKZ0WYMfh4AaABAg.9f6hAjkC0ct9f8jleOui-u)
https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxg9iT7MPWGBWruIzR4AaABAg (https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxg9iT7MPWGBWruIzR4AaABAg)
https://www.youtube.com/watch?v=tzbKqTRuRzU&lc=UgyYW2WZ2DvSrzUKnJ14AaABAg (https://www.youtube.com/watch?v=tzbKqTRuRzU&lc=UgyYW2WZ2DvSrzUKnJ14AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)



https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=UywjKEMjSp0&lc=UgxIySxHPqM1RxtVqoR4AaABAg.9edGvmwOLq99eekDyfS0 CD (https://www.youtube.com/watch?v=UywjKEMjSp0&lc=UgxIySxHPqM1RxtVqoR4AaABAg.9edGvmwOLq99eekDyfS0 CD)
https://www.youtube.com/watch?v=UywjKEMjSp0&lc=UgxIySxHPqM1RxtVqoR4AaABAg.9edGvmwOLq99eevG7txd 2c (https://www.youtube.com/watch?v=UywjKEMjSp0&lc=UgxIySxHPqM1RxtVqoR4AaABAg.9edGvmwOLq99eevG7txd 2c)
https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg (https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg)
https://www.youtube.com/watch?v=9P6r7DLS77Q&lc=UgzytUUVRyw9U55-6M54AaABAg (https://www.youtube.com/watch?v=9P6r7DLS77Q&lc=UgzytUUVRyw9U55-6M54AaABAg)
https://www.youtube.com/watch?v=9P6r7DLS77Q&lc=UgzCoa6tOVIBxRDDDbN4AaABAg (https://www.youtube.com/watch?v=9P6r7DLS77Q&lc=UgzCoa6tOVIBxRDDDbN4AaABAg)
https://www.youtube.com/watch?v=9P6r7DLS77Q&lc=UgyriWOelbVnw4FHWT54AaABAg.9dPo-OdLmZ09dc21kigjmr (https://www.youtube.com/watch?v=9P6r7DLS77Q&lc=UgyriWOelbVnw4FHWT54AaABAg.9dPo-OdLmZ09dc21kigjmr)
https://www.youtube.com/watch?v=363wd2EtQZ0&lc=UgzDQfo5rJqyVwvv2r54AaABAg (https://www.youtube.com/watch?v=363wd2EtQZ0&lc=UgzDQfo5rJqyVwvv2r54AaABAg)
https://www.youtube.com/watch?v=363wd2EtQZ0&lc=UgzHTSka7YppBdmUooV4AaABAg.9cXui6zzkz09cZttH_-2Gf (https://www.youtube.com/watch?v=363wd2EtQZ0&lc=UgzHTSka7YppBdmUooV4AaABAg.9cXui6zzkz09cZttH_-2Gf)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxhXnQ-mWYhrHWuM354AaABAg.9bepnegjnRu9iMmBDtf4m1 (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxhXnQ-mWYhrHWuM354AaABAg.9bepnegjnRu9iMmBDtf4m1)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxFIZ858qf7w_uA9bd4AaABAg.9dKpEpUk3YT9dVEGnka6 yj (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxFIZ858qf7w_uA9bd4AaABAg.9dKpEpUk3YT9dVEGnka6 yj)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugz8oC8iGd6-SPhpaQZ4AaABAg.9bhRt-kPXri9brzh_99JF9 (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugz8oC8iGd6-SPhpaQZ4AaABAg.9bhRt-kPXri9brzh_99JF9)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugz8oC8iGd6-SPhpaQZ4AaABAg.9bhRt-kPXri9bsrQIgXb3L (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugz8oC8iGd6-SPhpaQZ4AaABAg.9bhRt-kPXri9bsrQIgXb3L)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxwJDkFskrMW8EpcXt4AaABAg.9bmKMz5-Z1g9bmx0REIz41 (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxwJDkFskrMW8EpcXt4AaABAg.9bmKMz5-Z1g9bmx0REIz41)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxhXnQ-mWYhrHWuM354AaABAg.9bepnegjnRu9bmyko2YUvQ (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxhXnQ-mWYhrHWuM354AaABAg.9bepnegjnRu9bmyko2YUvQ)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxwJDkFskrMW8EpcXt4AaABAg.9bmKMz5-Z1g9bmzpPqfLRD (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxwJDkFskrMW8EpcXt4AaABAg.9bmKMz5-Z1g9bmzpPqfLRD)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzZwbV_Y_7UFzHwNBh4AaABAg.9dKb0Vc7MOB9dVK8si3o nt (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzZwbV_Y_7UFzHwNBh4AaABAg.9dKb0Vc7MOB9dVK8si3o nt)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugx6Ec_r4kb9EYOVgIt4AaABAg.9dOW613fb8V9dVIJECZI dC (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugx6Ec_r4kb9EYOVgIt4AaABAg.9dOW613fb8V9dVIJECZI dC)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgwBho9tBLQ4nPVdYqd4AaABAg.9fWvoBWY3Da9g9cLjhPi az (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgwBho9tBLQ4nPVdYqd4AaABAg.9fWvoBWY3Da9g9cLjhPi az)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzZy1NAMBx5Uv4U2cJ4AaABAg.9f0XX-_JaGp9g9bYLMZiIy (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzZy1NAMBx5Uv4U2cJ4AaABAg.9f0XX-_JaGp9g9bYLMZiIy)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyL-xp8IiiahmQ12kJ4AaABAg.9f7xHCpAEx29g9asFhVFfT (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyL-xp8IiiahmQ12kJ4AaABAg.9f7xHCpAEx29g9asFhVFfT)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxRxyFNNp3WHTzuiJJ4AaABAg.9fFR6ECmXk69g9afNBcS 4Z (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxRxyFNNp3WHTzuiJJ4AaABAg.9fFR6ECmXk69g9afNBcS 4Z)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgwsdMh0FGDfvA249_B4AaABAg.9fLR6FHCIVI9g9aLlUyz og (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgwsdMh0FGDfvA249_B4AaABAg.9fLR6FHCIVI9g9aLlUyz og)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgwBho9tBLQ4nPVdYqd4AaABAg.9fWvoBWY3Da9g9_4422N zK (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgwBho9tBLQ4nPVdYqd4AaABAg.9fWvoBWY3Da9g9_4422N zK)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugwyy8JXr56HJ8m_od94AaABAg.9gSFgqqJQNV9gTXco41b 5l (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=Ugwyy8JXr56HJ8m_od94AaABAg.9gSFgqqJQNV9gTXco41b 5l)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTYl6Rld pA (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTYl6Rld pA)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTfhAWU9 ju (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTfhAWU9 ju)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTfuYQGm Ua (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTfuYQGm Ua)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTg3AmMP Uc (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTg3AmMP Uc)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTgEqh5w do (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgyS8stMz5B9NrpPrbR4AaABAg.9gOjiS0rs8l9gTgEqh5w do)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxmUK0S_aZVZWz8-gt4AaABAg.9gLc3DfWfHl9gTZ3y6fL1H (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgxmUK0S_aZVZWz8-gt4AaABAg.9gLc3DfWfHl9gTZ3y6fL1H)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzZloYeY2wQr7-xTOh4AaABAg.9gB2bbbs9mB9gTZUkNYI8e (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzZloYeY2wQr7-xTOh4AaABAg.9gB2bbbs9mB9gTZUkNYI8e)
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzlM96nGEhW9J1Gpgd4AaABAg.9fmOFVcXZh49gT_8CYeQ gz (https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzlM96nGEhW9J1Gpgd4AaABAg.9fmOFVcXZh49gT_8CYeQ gz)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
01-22-2024, 03:25 AM
Coding for this post:
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23768

Note: The global variable declarations, Dim Clm As Long, Reocopy As Long , must be included at the top of the code module, so that they workm independently of the macros using them. Otherwise if they were declared inside any macro they would be local to that macro and could not be accessed by different macros as we need them to be. Just to explain that again a bit differently. If for example the declaration was done inside the recursion / reoccurring macro, then there would be an independent one for each copy of the recursion / reoccurring macro. That would only be referenced to by the code lines like Reocopy = Reocopy + 1 , Reocopy = Reocopy – 1 , and Clm = Clm + 1 specific to that copy, and further more they would "vanish" at the end of any copy macro. So those sort of declared variables could not be used to keep a running total or continual copy number reference which we want.


Option Explicit
Dim Clm As Long, Reocopy As Long ' variable for column number to put file or folder details in, number representin the copy of the second macro


Sub PassFolderForReocursing2()
'Sub SchellFolderDetails2() ' Jan 2024 https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23775
Rem 0
Let Clm = 0: Reocopy = -1
Rem 1
Dim Ws As Worksheet: Set Ws = Me ' G:\YouTubeVideos&Anaslysis&HackingTricks\VideoRecordingEditing\Windows (Live) Movie Maker\Movie Maker Versions.xls
' 1b
Dim Parf As String
' Let Parf = ThisWorkbook.Path & "\Versions Downloads Exes\Verson 2, 2 1 2 5 Downloads 2,1\50 Euro Keks"
' Let Parf = ThisWorkbook.Path & "\50 Euro Keks"
Let Parf = ThisWorkbook.Path
' 1c
If Len(Parf) - Len(Replace(Parf, "\", "", 1, -1, vbBinaryCompare)) >= 2 Then
Let ActiveCell = Mid(Parf, InStrRev(Parf, "\", InStrRev(Parf, "\", -1, vbBinaryCompare) - 1, vbBinaryCompare))
Else
Let ActiveCell = Parf
End If
Rem 2 Windows Shell object
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Parf) '
Rem 3 Movie Maker Folder Property names and Property values.
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' We loop through all items to find the Movie Maker folder ' =======
If Fil.Name = "Movie Maker" Then
Dim Rw As Long: Let Rw = 1
'Let ActiveCell.Offset(Rw, 0) = "Name": Let ActiveCell.Offset(Rw, 1) = objFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw, 0) = objFolder.GetDetailsOf("Goolies", 0): Let ActiveCell.Offset(Rw, 1) = objFolder.GetDetailsOf(Fil, 0)
'Let ActiveCell.Offset(Rw + 1, 0) = "Größe": Let ActiveCell.Offset(Rw + 1, 1) = objFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 1, 0) = objFolder.GetDetailsOf(71, 1): Let ActiveCell.Offset(Rw + 1, 1) = objFolder.GetDetailsOf(Fil, 1)
'Let ActiveCell.Offset(Rw + 2, 0) = "Elementtyp": Let ActiveCell.Offset(Rw + 2, 1) = objFolder.GetDetailsOf(Fil, 2)
Let ActiveCell.Offset(Rw + 2, 0) = objFolder.GetDetailsOf(Parf, 2): Let ActiveCell.Offset(Rw + 2, 1) = objFolder.GetDetailsOf(Fil, 2)
'Let ActiveCell.Offset(Rw + 3, 0) = "Änderungsdatum": Let ActiveCell.Offset(Rw + 3, 1) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 3, 0) = objFolder.GetDetailsOf(Ws, 3): Let ActiveCell.Offset(Rw + 3, 1) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
'Let ActiveCell.Offset(Rw + 4, 0) = "Erstelldatum": Let ActiveCell.Offset(Rw + 4, 1) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, 0) = objFolder.GetDetailsOf(Left("gh", 2), 4): Let ActiveCell.Offset(Rw + 4, 1) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, 0) = objFolder.GetDetailsOf("Bum", 166): Let ActiveCell.Offset(Rw + 5, 1) = objFolder.GetDetailsOf(Fil, 166)

Rem 4
ActiveCell.Offset(0, 2).Activate
' 4b
Call ReoccurringFileFolderProps2(Parf & "\Movie Maker")
Exit For ' Once we have passed on the full path of the folder, Movie Maker , then we are finished with this macro, so we don't need loop further looking fot the Movie Maker folder
Else
End If
Next Fil ' ================================================== =========================================
End Sub

' https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23774
Private Sub ReoccurringFileFolderProps2(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variable Reocopy is zero. It will become 1 on first entering the macro. Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use. However, should this macro "Call itself", before its finished , ( the recursion idea ) then the value will be 2 and so on. So effectively it tells us which copy is running at any time
Rem 1
Dim objShell As Shell32.Shell: 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.jpg
Dim objFolder As Shell32.Folder: Set objFolder = objShell.Namespace(Pf) '
Rem 2
Dim Fil As Shell32.FolderItem
For Each Fil In objFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = 1 + Reocopy + 1
Let ActiveCell.Offset(Rw, Clm) = objFolder.GetDetailsOf(Fil, 0)
Let ActiveCell.Offset(Rw + 1, Clm) = objFolder.GetDetailsOf(Fil, 1)
Let ActiveCell.Offset(Rw + 2, Clm) = objFolder.GetDetailsOf(Fil, 2)
Let ActiveCell.Offset(Rw + 3, Clm) = Left(objFolder.GetDetailsOf(Fil, 3), InStr(1, objFolder.GetDetailsOf(Fil, 3), " ", vbBinaryCompare))
Let ActiveCell.Offset(Rw + 4, Clm) = Left(objFolder.GetDetailsOf(Fil, 4), InStr(1, objFolder.GetDetailsOf(Fil, 4), " ", vbBinaryCompare))
' Let ActiveCell.Offset(Rw + 9, 0) = "Dateiversion": Let ActiveCell.Offset(Rw + 9, 1) = objFolder.GetDetailsOf(Fil, 166)
Let ActiveCell.Offset(Rw + 5, Clm) = objFolder.GetDetailsOf(Fil, 166)
'_________________________________________________ ________________________________________________
' 2b Here we may pause the macro, whilst another copy of it is started
If objFolder.GetDetailsOf(Fil, 2) = "Dateiordner" Then Call ReoccurringFileFolderProps2(Pf & "\" & objFolder.GetDetailsOf(Fil, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the abobe code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next Fil ' ============================== Main Loop =================================================|


Let Reocopy = Reocopy - 1 ' We are finished at this point with this running copy of the macro. (The next code line ends it). This code line here will reduce the value used to keep track of the copy number being run
End Sub

DocAElstein
01-22-2024, 08:49 PM
This is post
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23924&viewfull=1#post23924
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)/page18#post23924




Some notes in support of these Thread Posts

https://www.eileenslounge.com/viewtopic.php?p=313622#p313622
https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23769

Here’s the thing.
The Windows Shell object, (WSO), folder item way is a nice way to get at an extensive list of folder and file properties for the files and folders , (items), in a Folder.( https://www.youtube.com/watch?v=jTmVtPHtiTg ). But it’s a bit broken in places and/ or is not so precise in some size properties. But for now I want to do the main looping with the WSO.
The main purpose of this small test macro snippet is part of investigating a combination of the Windows Shell object folder item way and the Microsoft Scripting Runtime, (FSO), way to get some properties of the files ( and sub folders and their contents ) in a programmes folder of a software. This is for the purpose of comparing different versions of the same software, ( or to help determine if something masquerading as a software is a fake or has some unexpected additions or alterations ).




' To test, run this macro in any workbook that is in any folder, but that folder must also include this sample Folder, MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v
Sub TestWindowsShellObjectFolderItemWithFSOway() ' https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23924&viewfull=1#post23924 https://www.eileenslounge.com/viewtopic.php?p=313622#p313622 https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23769
' Early Binding Microsoft Scripting Runtime
'Dim objFSO As Scripting.FileSystemObject: Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
' Late Binding
Dim objFSO As Object: Set objFSO = CreateObject("Scripting.FileSystemObject")

' Early Binding for windows shell object Microsoft Shell Controls And Automation
'Dim objWSO As Shell32.Shell: 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
' Late Binding
Dim objWSO As Object: Set objWSO = CreateObject("shell.application")

'Dim objWSOFolder As Shell32.Folder
Dim objWSOFolder As Object

' ------- This section may not be needed by most people. I dabble in both English and German systems so I can't easilly hard code the item type name given for a folder by the WSO ( In German operating systems it is Dateiordner )
Set objWSOFolder = objWSO.Namespace(ThisWorkbook.Path)
'Dim FldItm As Shell32.FolderItem
Dim FldItm As Object
For Each FldItm In objWSOFolder.Items
Dim NmeOfAFldr As String
If objWSOFolder.GetDetailsOf(FldItm, 0) = "MMPropertyTest" Then
Let NmeOfAFldr = objWSOFolder.GetDetailsOf(FldItm, 2): Debug.Print NmeOfAFldr ' In German OS this is Dateiordner
Exit For ' I got what I want so don't meed to loop anymore
Else
End If
Next FldItm
' -------

' Now move on to getting some property detains of all items in the WSO folder object, objWSOFolder
Set objWSOFolder = objWSO.Namespace(ThisWorkbook.Path & "\MMPropertyTest")
'Dim FldItm As Shell32.FolderItem
For Each FldItm In objWSOFolder.Items
Dim Clm As Long: Let Clm = Clm + 1 ' For convenience each items properties will be put in the next column
Dim Rw As Long: Let Rw = 1 ' The row of the property
' Property Name of file or folder
Let ActiveCell.Offset(Rw, Clm) = objWSOFolder.GetDetailsOf(FldItm, 0) ' Name of folder or file using the WSO way
' Property File or folder size. I use the FSO for this to get a better precision and also because it seems to be broken for a folder item in WSO
If objWSOFolder.GetDetailsOf(FldItm, 2) = NmeOfAFldr Then ' GetDetailsOf(FldItm, 2) tells me the type of the WSO item
'Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\MMPropertyTest\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim objFSOFolder As Object: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\MMPropertyTest\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let ActiveCell.Offset(Rw + 1, Clm) = objFSOFolder.Size
Else ' If the item is not a folder, then I assume it will be a file?
'Dim ObjFSOFile As Scripting.File: Set ObjFSOFile = objFSO.GetFile(ThisWorkbook.Path & "\MMPropertyTest\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim ObjFSOFile As Object: Set ObjFSOFile = objFSO.GetFile(ThisWorkbook.Path & "\MMPropertyTest\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let ActiveCell.Offset(Rw + 1, Clm) = ObjFSOFile.Size
End If
' Property Date Last Modified Änderungsdatum
Let ActiveCell.Offset(Rw + 2, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 3), "dd,mmm,yy")
' Property Date Created Erstelldatum
Let ActiveCell.Offset(Rw + 3, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 4), "dd,mmm,yy")
' Property Version
Let ActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(FldItm, 166)
Next FldItm
End Sub



To test this coding, put this test folder,
MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v
, in any folder. Run the macro from any Excel file that is in the same folder that you put the folder MMPropertyTest in.
The results should be of this sort of form:
https://i.postimg.cc/k4FLjVpG/WSOwith-FSO-Test.jpg
https://i.postimg.cc/k4FLjVpG/WSOwith-FSO-Test.jpg (https://postimages.org/)





MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v

DocAElstein
01-25-2024, 04:02 PM
I took another little time out, as I was trying to tidy up my recursion / reoccurring coding, and I got a bit annoyed by Me.ActiveSheet not working.
https://eileenslounge.com/viewtopic.php?f=30&t=40560
I have that one sussed now I think,
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23926&viewfull=1#post23926
See also the next few posts, ( as referenced from https://eileenslounge.com/viewtopic.php?f=30&t=40560 )

So onward with the recursion/reoccurring coding, with a few modifications, mainly for the improved size property figures, but also a bit of general tidying up

Here is the next version of the recursion/ reoccurring coding


Option Explicit
' "Global" variables that must be declared here
Dim Clm As Long, Reocopy As Long ' variable for column number to put file or folder details in, number representing the copy of the second macro running at any time
' Variables useful/ efficient to declare here as "Global" variables
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.jpg
Dim objFSO As Scripting.FileSystemObject ' Early Binding ' Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
Dim MeActiveCell As Range ' For convenience all output will be referred to a start point. The user should make a selection in the workbook window that has the worksheet for output showing in it. We will then be able to get the ramge object into VBA from the ActiveCell property of that workbook window
Sub PassFolderForReocursing3() '
Rem 0
Let Clm = 1: Reocopy = 0 ' When this macro starts we have not started any output so our column number for output should not yet have been set, and no copies of the next macro will be running so the variable keeping track of the copy number of that macro should not have a number >= 1
Rem 1
Dim Ws As Worksheet: Set Ws = Me ' This is and the next bits are a personal preferrence. I like to fully explicitly tell VBA where things are, and I also have a habit of putting coding intended for a worksheet in that particular worksheets code module. Many people work on whatever worksheet is active, so they may prefer to change this to Set Ws = Application.ActiveSheet, and use that in the next bit.
Me.Activate: Set MeActiveCell = Workbooks(Me.Parent.Name).Windows.Item(1).ActiveCe ll ' https://eileenslounge.com/viewtopic.php?p=313747#p313747
' 1b
Dim Parf As String: Let Parf = ThisWorkbook.Path ' This should be given the path to the folder where the folder of interest is, so theere is a good chance this will need to be changed to suit quit often.
' 1c A short string part of the path put top left, not necerssary but just useful for later referrence to give indication of where the main folder was got from
If Len(Parf) - Len(Replace(Parf, "\", "", 1, -1, vbBinaryCompare)) >= 2 Then ' For a longer path it may be convenient to shorten the output given to the last bit
Let MeActiveCell = Mid(Parf, InStrRev(Parf, "\", InStrRev(Parf, "\", -1, vbBinaryCompare) - 1, vbBinaryCompare))
Else ' For a shorter path we can give the full path
Let MeActiveCell = Parf
End If
Rem 2 Windows Shell object
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 objWSOFolder As Shell32.Folder: Set objWSOFolder = objWSO.Namespace(Parf)

Rem 3 Movie Maker Folder Property names and Property values.
Dim FldItm As Shell32.FolderItem
For Each FldItm In objWSOFolder.Items ' We loop through all items to find the Movie Maker folder ' =======
If FldItm.Name = "Movie Maker" Then
Dim Rw As Long: Let Rw = 1
' Property Name of file or folder
Let MeActiveCell.Offset(Rw, 0) = objWSOFolder.GetDetailsOf("Willy", 0)
Let MeActiveCell.Offset(Rw, Clm) = objWSOFolder.GetDetailsOf(FldItm, 0) ' Name of folder or file using the WSO way
' Property File or folder size. I use the FSO for this to get a better precision and also because it seems to be broken for a folder item in WSO
Let MeActiveCell.Offset(Rw + 1, 0) = objWSOFolder.GetDetailsOf("Wonka", 1)
If objWSOFolder.GetDetailsOf(FldItm, 2) = "Dateiordner" Then ' GetDetailsOf(FldItm, 2) tells me the type of the WSO item
Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
'Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\MMPropertyTest\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = objFSOFolder.Size
Else ' If the item is not a folder, then I assume it will be a file?
Dim ObjFSOFile As Scripting.File: Set ObjFSOFile = objFSO.GetFile(ThisWorkbook.Path & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = ObjFSOFile.Size
End If
' Property Date Last Modified Änderungsdatum
Let MeActiveCell.Offset(Rw + 2, 0) = objWSOFolder.GetDetailsOf(42, 3)
Let MeActiveCell.Offset(Rw + 2, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 3), "dd,mmm,yy")
' Property Date Created Erstelldatum
Let MeActiveCell.Offset(Rw + 3, 0) = objWSOFolder.GetDetailsOf(42, 4)
Let MeActiveCell.Offset(Rw + 3, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 4), "dd,mmm,yy")
' Property Version
Let MeActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(666, 166)
Let MeActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(FldItm, 166)
Rem 4
Let Clm = 0
MeActiveCell.Offset(0, 2).Select: Set MeActiveCell = Workbooks(Me.Parent.Name).Windows.Item(1).ActiveCe ll ' https://eileenslounge.com/viewtopic.php?p=313747#p313747
' 4b
Call ReoccurringFldItmeFolderProps3(Parf & "\Movie Maker")
Exit For ' Once we have passed on the full path of the folder, Movie Maker , then we are finished with this macro, so we don't need loop further looking fot the Movie Maker folder
Else
End If
Next FldItm ' ================================================== =========================================
End Sub

Private Sub ReoccurringFldItmeFolderProps3(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variable Reocopy is zero. It will become 1 on first entering the macro. Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use. However, should this macro "Call itself", before its finished , ( the recursion idea ) then the value will be 2 and so on. So effectively it tells us which copy is running at any time
Rem 1
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 objWSOFolder As Shell32.Folder: Set objWSOFolder = objWSO.Namespace(Pf) '
Rem 2
Dim FldItm As Shell32.FolderItem
For Each FldItm In objWSOFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = Reocopy + 1
Let MeActiveCell.Offset(Rw, Clm) = objWSOFolder.GetDetailsOf(FldItm, 0)
If objWSOFolder.GetDetailsOf(FldItm, 2) = "Dateiordner" Then ' GetDetailsOf(FldItm, 2) tells me the type of the WSO item
Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
'Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\MMPropertyTest\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = objFSOFolder.Size
Else ' If the item is not a folder, then I assume it will be a file?
Dim ObjFSOFile As Scripting.File: Set ObjFSOFile = objFSO.GetFile(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = ObjFSOFile.Size
End If
Let MeActiveCell.Offset(Rw + 2, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 3), "dd,mmm,yy")
Let MeActiveCell.Offset(Rw + 3, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 4), "dd,mmm,yy")
Let MeActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(FldItm, 166)
'_________________________________________________ ________________________________________________
' 2b Here we may pause the macro, whilst another copy of it is started
If objWSOFolder.GetDetailsOf(FldItm, 2) = "Dateiordner" Then Call ReoccurringFldItmeFolderProps3(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the abobe code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next FldItm ' ============================== Main Loop =================================================|


Let Reocopy = Reocopy - 1 ' We are finished at this point with this running copy of the macro. (The next code line ends it). This code line here will reduce the value used to keep track of the copy number being run
End Sub



Working on this Movie Maker folder,
Movie Maker https://app.box.com/s/cxvc735a85q6az2r3gtb7ii9w2p3jzpf
, gives this https://i.postimg.cc/Gt7rMkSM/Recurssion-Reoccuring-coding-3.jpg
https://i.postimg.cc/Gt7rMkSM/Recurssion-Reoccuring-coding-3.jpg (https://postimg.cc/vxVpT6y9)


And here all the codings so far
https://i.postimg.cc/sxDs9nKQ/Initial-and-3-Recursion-coding-outputs.jpg
https://i.postimg.cc/sxDs9nKQ/Initial-and-3-Recursion-coding-outputs.jpg (https://postimg.cc/XGhRnkR4)

To demo: See next post

DocAElstein
01-25-2024, 04:02 PM
To Demo: Put Folder, Movie Maker , and file Movie Maker Versions.xls in the same place

Test Folder
Movie Maker https://app.box.com/s/cxvc735a85q6az2r3gtb7ii9w2p3jzpf

Run the macro Sub PassFolderForReocursing3() from withing the worksheets Version 2 code module in this file
Movie Maker Versions.xls https://app.box.com/s/axle7nflnmgkfbztto1wsmhc2ml2ynes



As per the demo, Working on this Movie Maker folder,
Movie Maker https://app.box.com/s/cxvc735a85q6az2r3gtb7ii9w2p3jzpf
, should give this https://i.postimg.cc/Gt7rMkSM/Recurssion-Reoccuring-coding-3.jpg
https://i.postimg.cc/Gt7rMkSM/Recurssion-Reoccuring-coding-3.jpg (https://postimg.cc/vxVpT6y9)


And here all the codings so far
https://i.postimg.cc/sxDs9nKQ/Initial-and-3-Recursion-coding-outputs.jpg
https://i.postimg.cc/sxDs9nKQ/Initial-and-3-Recursion-coding-outputs.jpg (https://postimg.cc/XGhRnkR4)


The whole point of all this is to do this sort of manually looking at stuff better and quicker.
https://i.postimg.cc/7YJxCzCw/Explore-MM-Files-and-Folders.jpg
https://i.postimg.cc/GHr0VHJ5/Explore-MM-Files-and-Folders.jpg (https://postimg.cc/GHr0VHJ5)https://i.postimg.cc/Z9sbw6Sv/Explore-MM-Files-and-Folders.jpg (https://postimg.cc/Z9sbw6Sv)https://i.postimg.cc/bJpZNRVg/Explore-MM-Files-and-Folders.jpg (https://postimg.cc/Z9sbw6Sv)

DocAElstein
01-25-2024, 04:02 PM
Some screen shots for this post https://eileenslounge.com/viewtopic.php?p=313792#p313792

https://i.postimg.cc/Gt7rMkSM/Recurssion-Reoccuring-coding-3.jpg (https://postimg.cc/vxVpT6y9) https://i.postimg.cc/xXgFzBng/WSOwith-FSO-Test-Eileen-Demo-v2.jpg (https://postimg.cc/xXgFzBng)
https://i.postimg.cc/vmdRpdjR/WSOwith-FSO-Test-Eileen-Demo-v2.jpg (https://postimg.cc/xXgFzBng)




......Here a slightly simpler demo, just for Eileens Lounge..., but it’s a real example looking at one of the smaller Folders I have been wanting to investigate.
To do it:
Put the uploaded file, EileenMMDemo.xls, and this folder ,
Movie Maker https://app.box.com/s/cxvc735a85q6az2r3gtb7ii9w2p3jzpf
, in the same place. Then just open the file EileenMMDemo.xls. That file only has one worksheet so the workbook should show just one window of that. In that window make a selection towards the left. Now run the only available macro, Sub PassFolderForReocursing3() , in that workbook which is in the only code module. At the start of the macro it will use the ActiveCell of that window to try and get a single cell range object from the your window Selection . It usually manages that, and goes on to put some results out with that cell at top left. It should look something like this (https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23929&viewfull=1#post23929)

DocAElstein
01-25-2024, 04:02 PM
Here is the main recursion / reoccurring macro 3 corrected slightly for to get the Late Binding working correctly

A couple of things were wrong, or rather one thing wrong, which hid a another problem that should have occurred: I had a few things not declared as objects as they should have been. As I coincidently still had the two library references checked, all still worked, and so did a string variable in this bit Set objWSOFolder = objWSO.Namespace(Pf)
Taking the references off, revealed the problem. Once that was fixed the other problem cropped up 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

This next coding is OK, I think


Option Explicit
' "Global" variables that must be declared here
Dim Clm As Long, Reocopy As Long ' variable for column number to put file or folder details in, number representing the copy of the second macro running at any time
' Variables useful/ efficient to declare here as "Global" variables
'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.jpg
Dim objWSO As Object ' Late Binding
'Dim objFSO As Scripting.FileSystemObject ' Early Binding ' Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
Dim objFSO As Object ' Late Binding
Dim MeActiveCell As Range ' For convenience all output will be referred to a start point. The user should make a selection in the workbook window that has the worksheet for output showing in it. We will then be able to get the ramge object into VBA from the ActiveCell property of that workbook window
Sub PassFolderForReocursing3() '
Rem 0
Let Clm = 1: Reocopy = 0 ' When this macro starts we have not started any output so our column number for output should not yet have been set, and no copies of the next macro will be running so the variable keeping track of the copy number of that macro should not have a number >= 1
Rem 1
Dim Ws As Worksheet: Set Ws = Me ' This is and the next bits are a personal preferrence. I like to fully explicitly tell VBA where things are, and I also have a habit of putting coding intended for a worksheet in that particular worksheets code module. Many people work on whatever worksheet is active, so they may prefer to change this to Set Ws = Application.ActiveSheet, and use that in the next bit.
Me.Activate: Set MeActiveCell = Workbooks(Me.Parent.Name).Windows.Item(1).ActiveCe ll ' https://eileenslounge.com/viewtopic.php?p=313747#p313747
' 1b
Dim Parf As String: Let Parf = ThisWorkbook.Path ' This should be given the path to the folder where the folder of interest is, so theere is a good chance this will need to be changed to suit quit often.
' 1c A short string part of the path put top left, not necerssary but just useful for later referrence to give indication of where the main folder was got from
If Len(Parf) - Len(Replace(Parf, "\", "", 1, -1, vbBinaryCompare)) >= 2 Then ' For a longer path it may be convenient to shorten the output given to the last bit
Let MeActiveCell = Mid(Parf, InStrRev(Parf, "\", InStrRev(Parf, "\", -1, vbBinaryCompare) - 1, vbBinaryCompare))
Else ' For a shorter path we can give the full path
Let MeActiveCell = Parf
End If
Rem 2 Windows Shell object
' 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(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

Rem 3 Movie Maker Folder Property names and Property values.
'Dim FldItm As Shell32.FolderItem
Dim FldItm As Object
For Each FldItm In objWSOFolder.Items ' We loop through all items to find the Movie Maker folder ' =======
If FldItm.Name = "Movie Maker" Then
Dim Rw As Long: Let Rw = 1
' Property Name of file or folder
Let MeActiveCell.Offset(Rw, 0) = objWSOFolder.GetDetailsOf("Willy", 0)
Let MeActiveCell.Offset(Rw, Clm) = objWSOFolder.GetDetailsOf(FldItm, 0) ' Name of folder or file using the WSO way
' Property File or folder size. I use the FSO for this to get a better precision and also because it seems to be broken for a folder item in WSO
Let MeActiveCell.Offset(Rw + 1, 0) = objWSOFolder.GetDetailsOf("Wonka", 1)
If objWSOFolder.GetDetailsOf(FldItm, 2) = "Dateiordner" Then ' GetDetailsOf(FldItm, 2) tells me the type of the WSO item
'Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim objFSOFolder As Object: Set objFSOFolder = objFSO.GetFolder(ThisWorkbook.Path & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = objFSOFolder.Size
Else ' If the item is not a folder, then I assume it will be a file?
'Dim ObjFSOFile As Scripting.File: Set ObjFSOFile = objFSO.GetFile(ThisWorkbook.Path & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim ObjFSOFile As Object: Set ObjFSOFile = objFSO.GetFile(ThisWorkbook.Path & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = ObjFSOFile.Size
End If
' Property Date Last Modified Änderungsdatum
Let MeActiveCell.Offset(Rw + 2, 0) = objWSOFolder.GetDetailsOf(42, 3)
Let MeActiveCell.Offset(Rw + 2, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 3), "dd,mmm,yy")
' Property Date Created Erstelldatum
Let MeActiveCell.Offset(Rw + 3, 0) = objWSOFolder.GetDetailsOf(42, 4)
Let MeActiveCell.Offset(Rw + 3, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 4), "dd,mmm,yy")
' Property Version
Let MeActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(666, 166)
Let MeActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(FldItm, 166)
Rem 4
Let Clm = 0
MeActiveCell.Offset(0, 2).Select: Set MeActiveCell = Workbooks(Me.Parent.Name).Windows.Item(1).ActiveCe ll ' https://eileenslounge.com/viewtopic.php?p=313747#p313747
' 4b
Call ReoccurringFldItmeFolderProps3(Parf & "\Movie Maker")
Exit For ' Once we have passed on the full path of the folder, Movie Maker , then we are finished with this macro, so we don't need loop further looking fot the Movie Maker folder
Else
End If
Next FldItm ' ================================================== =========================================
End Sub



Recursion / Reoccring part in next post

DocAElstein
01-25-2024, 04:02 PM
Private Sub ReoccurringFldItmeFolderProps3(ByVal Pf As String)
Rem 0
Let Reocopy = Reocopy + 1 ' Originally the variable Reocopy is zero. It will become 1 on first entering the macro. Every time we leave this macro, this number is reduced by 1 So in simple use it will be 1 or zero indicating that a copy is in use. However, should this macro "Call itself", before its finished , ( the recursion idea ) then the value will be 2 and so on. So effectively it tells us which copy is running at any time
Rem 1
'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((Pf)) '
Dim objWSOFolder As Object: Set objWSOFolder = objWSO.Namespace((Pf)) ' (( )) 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
Rem 2
'Dim FldItm As Shell32.FolderItem
Dim FldItm As Object
For Each FldItm In objWSOFolder.Items ' ======= Main Loop ================================================== |
' Dim Clm As Long: ' Global variable
Let Clm = Clm + 1
Dim Rw As Long: Let Rw = Reocopy + 1
Let MeActiveCell.Offset(Rw, Clm) = objWSOFolder.GetDetailsOf(FldItm, 0)
If objWSOFolder.GetDetailsOf(FldItm, 2) = "Dateiordner" Then ' GetDetailsOf(FldItm, 2) tells me the type of the WSO item
'Set objFSO = New Scripting.FileSystemObject ' https://i.postimg.cc/d1GHPGxJ/Microsoft-Scripting-Runtime-Library.jpg
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Dim objFSOFolder As Scripting.Folder: Set objFSOFolder = objFSO.GetFolder(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim objFSOFolder As Object: Set objFSOFolder = objFSO.GetFolder(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = objFSOFolder.Size
Else ' If the item is not a folder, then I assume it will be a file?
'Dim ObjFSOFile As Scripting.File: Set ObjFSOFile = objFSO.GetFile(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Dim ObjFSOFile As Object: Set ObjFSOFile = objFSO.GetFile(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
Let MeActiveCell.Offset(Rw + 1, Clm) = ObjFSOFile.Size
End If
Let MeActiveCell.Offset(Rw + 2, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 3), "dd,mmm,yy")
Let MeActiveCell.Offset(Rw + 3, Clm) = Format(objWSOFolder.GetDetailsOf(FldItm, 4), "dd,mmm,yy")
Let MeActiveCell.Offset(Rw + 4, Clm) = objWSOFolder.GetDetailsOf(FldItm, 166)
'_________________________________________________ ________________________________________________
' 2b Here we may pause the macro, whilst another copy of it is started
If objWSOFolder.GetDetailsOf(FldItm, 2) = "Dateiordner" Then Call ReoccurringFldItmeFolderProps3(Pf & "\" & objWSOFolder.GetDetailsOf(FldItm, 0))
'_________________________________________________ ________________________________________________
' If we did pause whilst the abobe code line set off another copy, then when that is finished we will come here and resume the paused previous copy
Next FldItm ' ============================== Main Loop =================================================|


Let Reocopy = Reocopy - 1 ' We are finished at this point with this running copy of the macro. (The next code line ends it). This code line here will reduce the value used to keep track of the copy number being run
End Sub

DocAElstein
01-25-2024, 04:04 PM
Some extended notes to go with this Thread post answer
https://eileenslounge.com/viewtopic.php?f=30&t=40560&p=313747#p313747
Hans set me straight with this nice concise bit https://eileenslounge.com/viewtopic.php?p=313743#p313743 , ( snb went off with a characteristic 80% Troll answer along the way, but I went along with it this time https://eileenslounge.com/viewtopic.php?p=313578#p313578
https://eileenslounge.com/viewtopic.php?p=313622#p313622
https://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-2-%28-Codes-for-other-Threads-HTML-Tables-etc-%29?p=23917&viewfull=1#post23917 )
Finally another post from Hans, thereafter I had it clear ……..

https://eileenslounge.com/viewtopic.php?f=30&t=40560&p=313747#p313747
If you have opened only one window on the workbook, you can also use
Workbooks("Book.xls").Windows(1).ActiveCell


Interesting.
I had a feeling there where multiple window possibilities around and it scared me a bit for a couple of reasons:
_ one being I figured it would be something that I would easily get in a muddle with;
_ the other reason being that how things can or do get displayed in multiple windows or multiple instances is a bit controversial I think

Nevertheless, I took the plunge, and did try for the first time in my life to get a multiple workbook window. It was quite easy, (I did it manually, - there are plenty of simple tutorials on the internet to show you how), for example, with my first sample file, MeActiveStuff.xls , I ended up with these 2 windows after a couple of clicks
MeActiveStuff.xls:1
and
MeActiveStuff.xls:2
( It demonstrates why I like to keep a few Excel versions, even some newer versions despite preferring older ones: In this case things will look a bit different for the multiple workbook window and that’s one of the controversial things some people get excited about, I believe. I am staying neutral on that one as I never needed multiple workbook windows, instanciated or not)
https://i.postimg.cc/qRfGpY00/XL-2010-Workbook-split-view-2-windows.jpg https://i.postimg.cc/cHQBCm43/XL-2013-Workbooks-Me-Active-Stuff-Windows-1-and-2.jpg
https://i.postimg.cc/VSRtRKdH/XL-2010-Workbook-split-view-2-windows.jpg (https://postimg.cc/VSRtRKdH) https://i.postimg.cc/qhv3Z2KB/XL-2013-Workbooks-Me-Active-Stuff-Windows-1-and-2.jpg (https://postimg.cc/qhv3Z2KB)



It is interesting though to help get this last bit of stuff a bit clearer in my mind, but at the same time, it's confirmed that it’s a bit confusing, at least for me: I think you have to be very very careful you don’t get mixed up……

At first I thought the
window item number and window caption name alternatives
might be a parallel idea to the
string tab name or item position number alternatives
for a worksheet. Whether it is or not perhaps depends on your view point, literally and mentally

This little demo macro might be useful for future reference: The main bits are 3 sets of 3 line sections. The first and third set of 3 lines are identical and the second is not much different.

Sub WorkbookWindowSCaptionNameAndItems() ' https://eileenslounge.com/viewtopic.php?p=313747#p313747
Rem 1
' 1a) Make a ActiveCell in B2 of the first worksheet
11 Workbooks("MeActiveStuff.xls").Windows.Item("MeActiveStuff.xls:1").Activate
12 Workbooks("MeActiveStuff.xls").Worksheets.Item(1).Activate
13 ActiveSheet.Range("B2").Select ' Effectively this will Make the ActiveCell in Workbooks("MeActiveStuff.xls"), Windows.Item("MeActiveStuff.xls:1") range B2 in the first worksheet
' 1b) Make a ActiveCell in A2 of the second worksheet
21 Workbooks("MeActiveStuff.xls").Windows.Item("MeActiveStuff.xls:2").Activate
22 Workbooks("MeActiveStuff.xls").Worksheets.Item(2).Activate
23 ActiveSheet.Range("A2").Select ' Effectively this will Make the ActiveCell in Workbooks("MeActiveStuff.xls"), Windows.Item("MeActiveStuff.xls:2") range A2 in the second worksheet
Debug.Print "Rem 1 Results"
Dim Windoe As Object, Cnt As Long
For Each Windoe In ThisWorkbook.Windows
Let Cnt = Cnt + 1
Debug.Print Cnt & " " & Windoe.Caption & " " & ThisWorkbook.Windows.Item(Cnt).Caption & " " & ThisWorkbook.Windows.Item(Cnt).ActiveCell.Address( , , , External:=True)
Next Windoe
Let Cnt = 0 ' You better do this or else in the next loop you will be trying to get at Item numbers above 2, and we aint got any
Debug.Print
Rem 2 repeat the first 3 lines - remake the first ActiveCell in B2 of the first worksheet
31 Workbooks("MeActiveStuff.xls").Windows.Item("MeActiveStuff.xls:1").Activate
32 Workbooks("MeActiveStuff.xls").Worksheets.Item(1).Activate
33 ActiveSheet.Range("B2").Select ' Effectively this will Make the ActiveCell in Workbooks("MeActiveStuff.xls"), Windows.Item("MeActiveStuff.xls:1") range B2 in the first worksheet
Debug.Print "Rem 2 Results"
For Each Windoe In ThisWorkbook.Windows
Let Cnt = Cnt + 1
Debug.Print Cnt & " " & Windoe.Caption & " " & ThisWorkbook.Windows.Item(Cnt).Caption & " " & ThisWorkbook.Windows.Item(Cnt).ActiveCell.Address( , , , External:=True)
Next Windoe


End Sub If I have got it right, the 3 lines do the necessary to make the same two "ActiveCells" that my original Sub MesActiveCell() (https://eileenslounge.com/viewtopic.php?p=313741#p313741) did. In that original attempt, I did not really make two ActiveCells , what really I did was set some memory of the last selection made on the two worksheets of the file MeActiveStuff.xls

The third line set simply do exactly what the first did again. So there are really only two unique sets of 3 lines. Each unique set now actually makes a real ActiveCell from the same two selections I did before in my original Sub MesActiveCell() (https://eileenslounge.com/viewtopic.php?p=313741#p313741)
There are two similar sets of output results, the first set is given out after making the two ActiveCells,
and the second results are given out after the first ActiveCell is made again. Obviously this last set of code lines is redundant, but it does something:

Rem 1 Results
1 MeActiveStuff.xls:2 MeActiveStuff.xls:2 [MeActiveStuff.xls]Tabelle2!$A$2
2 MeActiveStuff.xls:1 MeActiveStuff.xls:1 [MeActiveStuff.xls]Tabelle1!$B$2

Rem 2 Results
1 MeActiveStuff.xls:1 MeActiveStuff.xls:1 [MeActiveStuff.xls]Tabelle1!$B$2
2 MeActiveStuff.xls:2 MeActiveStuff.xls:2 [MeActiveStuff.xls]Tabelle2!$A$2
The important thing to note is that the window Item number is reflecting the order of a ActiveCell being made, - you can see the order has swapped around. That can perhaps be related vaguely to Item number order in worksheets: If you remade the first worksheet or swapped around physically the tabs, you see a similar change in the Item number.
In other words, the Window with the caption name and the ActiveCell is fixed, but the window item number can change: The item number is somehow related to the order of the things, the item number is not a number like a serial number/ string name using number characters

So finally I think it is a bit too confusing for me to want to dabble very often with more than one window on the workbook. But at the same time it has helped me to get the thing a bit clearer, and so I think I will then go for this

Me.Activate: Dim MeActiveCell As Range: Set MeActiveCell = Workbooks(Me.Parent.Name).Windows.Item(1).ActiveCe ll ' https://eileenslounge.com/viewtopic.php?p=313747#p313747 Somehow that does look a little better and rolls off my tongue that little bit subtly better than the last one and I think in my brain memory system will help me remember what it’s all about. Then I am happy I know about it enough not for it to annoy me quite so much. I gots a nice understanding now on this one, :)

DocAElstein
01-25-2024, 04:16 PM
l https://i.postimg.cc/qRfGpY00/XL-2010-Workbook-split-view-2-windows.jpg https://i.postimg.cc/cHQBCm43/XL-2013-Workbooks-Me-Active-Stuff-Windows-1-and-2.jpg
https://i.postimg.cc/qRfGpY00/XL-2010-Workbook-split-view-2-windows.jpg (https://postimages.org/)

https://i.postimg.cc/cHQBCm43/XL-2013-Workbooks-Me-Active-Stuff-Windows-1-and-2.jpg (https://postimages.org/)




Sub WorkbookWindowSCaptionNameAndItems() ' https://eileenslounge.com/viewtopic.php?p=313747#p313747
Rem 1
' 1a) Make a ActiveCell in B2 of the first worksheet
11 Workbooks("MeActiveStuff.xls").Windows.Item("MeActiveStuff.xls:1").Activate
12 Workbooks("MeActiveStuff.xls").Worksheets.Item(1).Activate
13 ActiveSheet.Range("B2").Select ' Effectively this will Make the ActiveCell in Workbooks("MeActiveStuff.xls"), Windows.Item("MeActiveStuff.xls:1") range B2 in the first worksheet
' 1b) Make a ActiveCell in A2 of the second worksheet
21 Workbooks("MeActiveStuff.xls").Windows.Item("MeActiveStuff.xls:2").Activate
22 Workbooks("MeActiveStuff.xls").Worksheets.Item(2).Activate
23 ActiveSheet.Range("A2").Select ' Effectively this will Make the ActiveCell in Workbooks("MeActiveStuff.xls"), Windows.Item("MeActiveStuff.xls:2") range A2 in the second worksheet
Debug.Print "Rem 1 Results"
Dim Windoe As Object, Cnt As Long
For Each Windoe In ThisWorkbook.Windows
Let Cnt = Cnt + 1
Debug.Print Cnt & " " & Windoe.Caption & " " & ThisWorkbook.Windows.Item(Cnt).Caption & " " & ThisWorkbook.Windows.Item(Cnt).ActiveCell.Address( , , , External:=True)
Next Windoe
Let Cnt = 0 ' You better do this or else in the next loop you will be trying to get at Item numbers above 2, and we aint got any
Debug.Print
Rem 2 repeat the first 3 lines - remake the first ActiveCell in B2 of the first worksheet
31 Workbooks("MeActiveStuff.xls").Windows.Item("MeActiveStuff.xls:1").Activate
32 Workbooks("MeActiveStuff.xls").Worksheets.Item(1).Activate
33 ActiveSheet.Range("B2").Select ' Effectively this will Make the ActiveCell in Workbooks("MeActiveStuff.xls"), Windows.Item("MeActiveStuff.xls:1") range B2 in the first worksheet
Debug.Print "Rem 2 Results"
For Each Windoe In ThisWorkbook.Windows
Let Cnt = Cnt + 1
Debug.Print Cnt & " " & Windoe.Caption & " " & ThisWorkbook.Windows.Item(Cnt).Caption & " " & ThisWorkbook.Windows.Item(Cnt).ActiveCell.Address( , , , External:=True)
Next Windoe


End Sub























Results




Rem 1 Results
1 MeActiveStuff.xls:2 MeActiveStuff.xls:2 [MeActiveStuff.xls]Tabelle2!$A$2
2 MeActiveStuff.xls:1 MeActiveStuff.xls:1 [MeActiveStuff.xls]Tabelle1!$B$2

Rem 2 Results
1 MeActiveStuff.xls:1 MeActiveStuff.xls:1 [MeActiveStuff.xls]Tabelle1!$B$2
2 MeActiveStuff.xls:2 MeActiveStuff.xls:2 [MeActiveStuff.xls]Tabelle2!$A$2
The important thing to note is that the window Item number is reflecting the order of a ActiveCell being made, - you can see the order has swapped around. That can perhaps be related vaguely to Item number order in worksheets: If you remade the first worksheet or swapped around physically the tabs, you see a similar change in the Item number.
In other words, the Window with the caption name and the ActiveCell is fixed, but the window item number can change: The item number is somehow related to the order of the things, the item number is not a number like a serial number/ string name using number characters

DocAElstein
01-30-2024, 09:31 PM
Later

DocAElstein
01-30-2024, 09:31 PM
later

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg.A0opm95t2XEA0q3Kshmu uY (https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg.A0opm95t2XEA0q3Kshmu uY)
https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg (https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg)
https://eileenslounge.com/viewtopic.php?p=318868#p318868 (https://eileenslounge.com/viewtopic.php?p=318868#p318868)
https://eileenslounge.com/viewtopic.php?p=318311#p318311 (https://eileenslounge.com/viewtopic.php?p=318311#p318311)
https://eileenslounge.com/viewtopic.php?p=318302#p318302 (https://eileenslounge.com/viewtopic.php?p=318302#p318302)
https://eileenslounge.com/viewtopic.php?p=317704#p317704 (https://eileenslounge.com/viewtopic.php?p=317704#p317704)
https://eileenslounge.com/viewtopic.php?p=317704#p317704 (https://eileenslounge.com/viewtopic.php?p=317704#p317704)
https://eileenslounge.com/viewtopic.php?p=317857#p317857 (https://eileenslounge.com/viewtopic.php?p=317857#p317857)
https://eileenslounge.com/viewtopic.php?p=317541#p317541 (https://eileenslounge.com/viewtopic.php?p=317541#p317541)
https://eileenslounge.com/viewtopic.php?p=317520#p317520 (https://eileenslounge.com/viewtopic.php?p=317520#p317520)
https://eileenslounge.com/viewtopic.php?p=317510#p317510 (https://eileenslounge.com/viewtopic.php?p=317510#p317510)
https://eileenslounge.com/viewtopic.php?p=317547#p317547 (https://eileenslounge.com/viewtopic.php?p=317547#p317547)
https://eileenslounge.com/viewtopic.php?p=317573#p317573 (https://eileenslounge.com/viewtopic.php?p=317573#p317573)
https://eileenslounge.com/viewtopic.php?p=317574#p317574 (https://eileenslounge.com/viewtopic.php?p=317574#p317574)
https://eileenslounge.com/viewtopic.php?p=317582#p317582 (https://eileenslounge.com/viewtopic.php?p=317582#p317582)
https://eileenslounge.com/viewtopic.php?p=317583#p317583 (https://eileenslounge.com/viewtopic.php?p=317583#p317583)
https://eileenslounge.com/viewtopic.php?p=317605#p317605 (https://eileenslounge.com/viewtopic.php?p=317605#p317605)
https://eileenslounge.com/viewtopic.php?p=316935#p316935 (https://eileenslounge.com/viewtopic.php?p=316935#p316935)
https://eileenslounge.com/viewtopic.php?p=317030#p317030 (https://eileenslounge.com/viewtopic.php?p=317030#p317030)
https://eileenslounge.com/viewtopic.php?p=317030#p317030 (https://eileenslounge.com/viewtopic.php?p=317030#p317030)
https://eileenslounge.com/viewtopic.php?p=317014#p317014 (https://eileenslounge.com/viewtopic.php?p=317014#p317014)
https://eileenslounge.com/viewtopic.php?p=316940#p316940 (https://eileenslounge.com/viewtopic.php?p=316940#p316940)
https://eileenslounge.com/viewtopic.php?p=316927#p316927 (https://eileenslounge.com/viewtopic.php?p=316927#p316927)
https://eileenslounge.com/viewtopic.php?p=316875#p316875 (https://eileenslounge.com/viewtopic.php?p=316875#p316875)
https://eileenslounge.com/viewtopic.php?p=316704#p316704 (https://eileenslounge.com/viewtopic.php?p=316704#p316704)
https://eileenslounge.com/viewtopic.php?p=316412#p316412 (https://eileenslounge.com/viewtopic.php?p=316412#p316412)
https://eileenslounge.com/viewtopic.php?p=316412#p316412 (https://eileenslounge.com/viewtopic.php?p=316412#p316412)
https://eileenslounge.com/viewtopic.php?p=316254#p316254 (https://eileenslounge.com/viewtopic.php?p=316254#p316254)
https://eileenslounge.com/viewtopic.php?p=316046#p316046 (https://eileenslounge.com/viewtopic.php?p=316046#p316046)
https://eileenslounge.com/viewtopic.php?p=317050&sid=d7e077e50e904a138c794e1f2115da95#p317050 (https://eileenslounge.com/viewtopic.php?p=317050&sid=d7e077e50e904a138c794e1f2115da95#p317050)
https://www.youtube.com/@alanelston2330 (https://www.youtube.com/@alanelston2330)
https://www.youtube.com/watch?v=yXaYszT11CA&lc=UgxEjo0Di9-9cnl8UnZ4AaABAg.9XYLEH1OwDIA35HNIei0z- (https://www.youtube.com/watch?v=yXaYszT11CA&lc=UgxEjo0Di9-9cnl8UnZ4AaABAg.9XYLEH1OwDIA35HNIei0z-)
https://eileenslounge.com/viewtopic.php?p=316154#p316154 (https://eileenslounge.com/viewtopic.php?p=316154#p316154)
https://www.youtube.com/watch?v=TW3l7PkSPD4&lc=UgwAL_Jrv7yg7WWC8x14AaABAg (https://www.youtube.com/watch?v=TW3l7PkSPD4&lc=UgwAL_Jrv7yg7WWC8x14AaABAg)
https://teylyn.com/2017/03/21/dollarsigns/#comment-191 (https://teylyn.com/2017/03/21/dollarsigns/#comment-191)
https://eileenslounge.com/viewtopic.php?p=317050#p317050 (https://eileenslounge.com/viewtopic.php?p=317050#p317050)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
01-30-2024, 09:31 PM
and later again

DocAElstein
01-30-2024, 09:36 PM
Some notes in support of this forum post
https://eileenslounge.com/viewtopic.php?p=313848#p313848


Hello, :)

If you have time to help me make some coding I am sharing to anyone work in more languages and operating system, then please follow the Instructions below.
So far I have results for:
Operating systems XP, Vista, Win 7, Win 8.1, Win 10, Win 11 German
Operating systems Win 10, Win 11 English



Instructions
Download both files and put them anywhere, but both in the same place
WSO_PropNames.xls https://app.box.com/s/ynlabyb11ekmj6m4we99wk9xd7gx0xn3
sample.wmv https://app.box.com/s/leu06ql1fu9uzt59wnoizedg85qoo7k4

Open just WSO_PropNames.xls, it should look something like this, with columns AA and AB empty
https://i.postimg.cc/QN9RhZsF/Before-Tabelle8-Schell-Get-Null-Details.jpg

5732https://i.postimg.cc/NLtNkVKt/Before-Tabelle8-Schell-Get-Null-Details.jpg (https://postimg.cc/NLtNkVKt)

Now run the only macro in it, WSO_PropNames.xls and run Sub SchellGetNullDetails() ( Tabelle8.SchellGetNullDetails
https://i.postimg.cc/wxCnB4T0/Tabelle8-Schell-Get-Null-Details.jpg

5733https://i.postimg.cc/BtCmYgFK/Tabelle8-Schell-Get-Null-Details.jpg (https://postimg.cc/BtCmYgFK)


After running that coding, you should see something approximately like this
https://i.postimg.cc/ZRg2pVPY/After-Tabelle8-Schell-Get-Null-Details.jpg

5734https://i.postimg.cc/YG6dwNyT/After-Tabelle8-Schell-Get-Null-Details.jpg (https://postimg.cc/YG6dwNyT)



Please now save the excel file and return it to me somehow: For example, post anywhere here at excelfox.com, or in that thread at https://eileenslounge.com , https://eileenslounge.com/viewtopic.php?f=30&t=40533

Thanks,
Alan

DocAElstein
02-01-2024, 03:44 PM
This is post
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23968&viewfull=1#post23968
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23968&viewfull=1#post23968
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page3
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page3#post23968
, in support of this main forum question
https://eileenslounge.com/viewtopic.php?p=313909#p313909



Hi,

...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 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 way,
objWSOFolder.GetDetailsOf(FldItm, PropItmNmbr)


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.9xhyRrsUUOM9zYlZPKdO pm", 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")



' This next function adds the possibility of multiple name attempts for example if you have the property name in different language, (and if you know of different names within the same language!!). You can give a single name or several names which should be separated by a comma, a semi colon, or any number or spaces more than one, or a combination of spaces and a comma or a semi colon

Sub TestItmNmbrWSOfromPropNameS() ' 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
Debug.Print "Name "; Tab(25); ItmNmbrWSOfromPropNameS("Name") ' German and English name property
Debug.Print "Size "; Tab(25); ItmNmbrWSOfromPropNameS("Größe, Size") ' German and English size property
Debug.Print "Version "; Tab(25); ItmNmbrWSOfromPropNameS("Dateiversion;File version") ' German and English version property
Debug.Print "Last modified date "; Tab(25); ItmNmbrWSOfromPropNameS("Geändert am, Date modified; Änderungsdatum") ' German and English date last modified property
Debug.Print "Created date "; Tab(25); ItmNmbrWSOfromPropNameS("Date created, Erstellt am, Erstelldatum") ' German and English datee created property
End Sub

' The next function adds the possibility of multiple name attempts for example if you have the property name in different languages. You can give a single name or several names which should be separated by a comma, a semi colon, or any number or spaces or a combination of spaces and a comma or a semi colon
' The function returns the property number and the name found, if successful
Public Function ItmNmbrWSOfromPropNameS(ByVal PropNme As String) As String
Let PropNme = Trim(PropNme) ' VBA Trim remove just leading and trailing sppaces
' Let PropNme = Replace(PropNme, " ", " ", 1, -1, vbBinaryCompare)
Let PropNme = Replace(PropNme, ";", " ", 1, -1, vbBinaryCompare)
Let PropNme = Replace(PropNme, ",", " ", 1, -1, vbBinaryCompare)
' Let PropNme = Application.Trim(PropNme) ' Remove all leading and trailing spaces, and all spaces more than one in between
Let PropNme = Replace(PropNme, " ", " ", 1, -1, vbBinaryCompare) ' 6 spaces to 2 spaces
Let PropNme = Replace(PropNme, " ", " ", 1, -1, vbBinaryCompare) ' 5 spaces to 2 spaces
Let PropNme = Replace(PropNme, " ", " ", 1, -1, vbBinaryCompare) ' 4 spaces to 2 spaces
Let PropNme = Replace(PropNme, " ", " ", 1, -1, vbBinaryCompare) ' 3 spaces to 2 spaces
Dim arrNms() As String: Let arrNms() = Split(PropNme, " ", -1, vbBinaryCompare)
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
Dim Cnt As Long
For Cnt = LBound(arrNms()) To UBound(arrNms())
'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.9xhyRrsUUOM9zYlZPKdO pm", PropItmNmbr) = PropNme Then
If objWSOFolder.GetDetailsOf(Null, PropItmNmbr) = arrNms(Cnt) Then
Let ItmNmbrWSOfromPropNameS = PropItmNmbr & " " & arrNms(Cnt) ' Effectively fill the pseudo String variable ItmNmbrWSOfromPropName with the number you were looking for
Exit Function
Else
End If
Next Cnt
Next PropItmNmbr
Let ItmNmbrWSOfromPropNameS = "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 of the numbers you looped ( 0 to 400 )
End Function





' The function returns the property number and the name found, if successful, for example using the test macro we get in German windows 10

Name 0 Name
Size 1 Größe
Version 166 Dateiversion
Last modified date 3 Änderungsdatum
Created date 4 Erstelldatum

DocAElstein
02-03-2024, 02:46 PM
This is post
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23969
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23969
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23969
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23969



Some extra notes for this forum post
https://eileenslounge.com/viewtopic.php?p=313961#p313961 https://eileenslounge.com/viewtopic.php?p=313971#p313971


https://eileenslounge.com/viewtopic.php?p=313961#p313961
>How? By uising the (hidden) ExtendedProperty property ...
… 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)

Microsoft Windows SDK
This is one of those Microsoft things that no one understands because it is too vague and open to interpretation and later change to whatever it ever was, but people who used something that may be somehow or was at some time part of whatever it is, or may have been at any time, will use words as if they know what it is, even though that is impossible. It might be just about possible to say it has things, such as important lists not so typically available or talked about information but that might be necessary for a software developer to make something using Microsoft stuff that might be to the benefit of Microsoft. So a sort of physiological trick to make useful information available to some people in a careful selective way: Microsoft don’t want people to get useful things of theirs working consistently too well. It’s partly useful background long time reliable windows stuff that Microsoft might use themselves but then try to wrap in a way that they can more easily control and sabotage later. It has some similar stuff and ideas to the equally mysterious .Net

I think Mike (SpeakEasy) is a fifth columnist working for Microsoft, feeding us some secrets to gain our trust, then he will drop something on us that will trash all or computers forcing us all to get windows 12 which will just be a wrapper for an artificial intelligence that will take over and control us as its servants.

Anyway, I found after downloading this (https://i.postimg.cc/nhcZ9BrX/Windows-sdk.jpg) , in it somewhere after downloading it, whatever it is, this file here
here: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\propkey.h
https://i.postimg.cc/xdVmfPYz/C-Program-Files-x86-Windows-Kits-10-Include-10-0-22621-0-um-propkey-h.jpg
5749 https://i.postimg.cc/68zqzn8W/C-Program-Files-x86-Windows-Kits-10-Include-10-0-22621-0-um-propkey-h.jpg (https://postimg.cc/68zqzn8W)

That appears to be something of as text file,
https://i.postimg.cc/6q9QGDf2/propkey-h-Properties.jpg
5750 https://i.postimg.cc/34chsf6Y/propkey-h-Properties.jpg (https://postimg.cc/34chsf6Y)

, which I opened with a text editor and saved as a text file
propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2




Took a look at the text file, https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff/page12
https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23981&viewfull=1#post23981 https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23979&viewfull=1#post23979

The TLDR
It’s nicely ordered in text sections like this

// 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 }
Did a macro , Sub ExtendedPropertiesList(), it…
_ REM 1 gets the text file as a long string
_ '1b splits the text up using something that appears to be used once for every property ,
// Name: System.
_ Rem 2 The macro then puts that array of text(string) elements as a simple list in the first column of an Excel file https://i.postimg.cc/QMtxzmJ8/Excel-first-column-List-of-Proph-Keys.jpg , https://postimg.cc/sMkrQpLq/1ed786fd
https://i.postimg.cc/sMkrQpLq/Excel-first-column-List-of-Proph-Keys.jpg (https://postimg.cc/sMkrQpLq)
( I remove wrap text with the macro , so as to make the list and those derived from part of the data a bit more manageable. That way I can reduce the column width and when I put anything in the next column, I don’t easily see all the text, but it is there if I need it. I am mainly interested in having the data somewhere for now.)
( _ Rem 3
I took look in detail at the exact characters in a few of those sections. There were no great surprises in terms of strange characters. https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23981&viewfull=1#post23981 )
_ Rem 4
This demonstrates why in this case a list in an Excel column can be useful, (which I might more usually avoid for performance reasons such as spreadsheet interactions being relatively slow, and simple text file alternative list would be easier to store, share etc.). The Evaluate Range very efficiently picks out the important name part of the propherkeys, for example in the above section example, that would be Size. Here is a full development of that Evaluate range solution, https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23983&viewfull=1#post23983
WSO_PropNamesExtended.xls https://app.box.com/s/sv5rxxtwv1v18ir3xmi6gdti8pawx0jq


' https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23979&viewfull=1#post23979 https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23983&viewfull=1#post23983
Sub ExtendedPropertiesList()
' Rem 1 Get the text file as a long single string
Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
Dim PathAndFileName As String, TotalFile As String
Let PathAndFileName = ThisWorkbook.Path & Application.PathSeparator & "propkey h.txt" '
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundamental type data input...
' Let TotalFile = Space(LOF(FileNum)) '....and wot receives it has to be a string of exactly the right length
'Get #FileNum, , TotalFile
' Or http://www.eileenslounge.com/viewtopic.php?p=295782&sid=f6dcab07c4d24e00e697fe4343dc7392#p295782
Let TotalFile = Input(LOF(FileNum), FileNum)
Close #FileNum
' 1b Split the Prophs
Dim arrProphs() As String: Let arrProphs() = Split(TotalFile, "// Name: System.", -1, vbBinaryCompare)
' Rem 2 Quick look at list
Dim LCnt As Long: Let LCnt = UBound(arrProphs())
Dim Rws() As Variant, Clms() As Variant, VertList() As Variant
Let Rws() = Evaluate("ROW(1:" & LCnt + 1 & ")/ROW(1:" & LCnt + 1 & ")")
Let Clms() = Evaluate("ROW(1:" & LCnt + 1 & ")")
Let VertList() = Application.Index(arrProphs(), Rws(), Clms())
Let Me.Range("A1:A" & LCnt & "") = VertList()
Me.Cells.WrapText = False
Rem 4
'' 2b) Look at some example props using function WtchaGot_Unic_NotMuchIfYaChoppedItOff
'' The next text is copied from cell A 350
'' "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 }
''
'' "
'' The next text is copied from watch window at arrProphs()(349)
'' : arrProphs()(349) : "Size -- PKEY_Size
'' // Type: UInt64 -- VT_UI8
'' // FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
'' //
'' //
'' DEFINE_PROPERTYKEY(PKE"
Rem 3
' Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(arrProphs()( 349), "Size349")

Rem 4 Evaluate Range to get just the property to use in like .ExtendedProperty("System.Size")
Dim arrExtProps() As Variant '
Let arrExtProps() = Me.Evaluate("IF({1},LEFT(A2:A1055,SEARCH("" -- PKEY"",A2:A1055)-1))")
' 3b) Paste into a worksheet column
Let Me.Range("E2:E1055") = arrExtProps()
'Stop
End Sub


A simple coding puts that second column of propherkeys in a text file
https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23981&viewfull=1#post23981


Conclusions
So from the initial Investigations, It appears that we have 1054 of these things.
In the next posts we review and look in more detail

DocAElstein
02-03-2024, 02:46 PM
later

DocAElstein
02-03-2024, 02:46 PM
This is post
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23971
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23971
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23971
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23971







Some extra notes for this forum post
https://eileenslounge.com/viewtopic.php?p=313971#p313971




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 File
Set objWSOPassName = objWSOFolder.ParseName("sample.wmv") ' file
Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size") ' Accurate size: 643170
Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified") ' Date Modified: 19.11.2002 09:41:48
Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated") ' Date Created: 18.01.2024 17:19:04
Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay") ' Path: F:\MMPropertyTest
Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay") ' Name: sample.wmv
Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText") ' Type: WMV-Datei
Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion") ' Version:
Debug.Print

' 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 File
Set objWSOPassName = objWSOFolder.ParseName("sample.wmv") ' file
Debug.Print "Accurate size: " & objWSOPassName.ExtendedProperty("System.Size") ' Accurate size: 643170
Debug.Print "Date Modified: " & objWSOPassName.ExtendedProperty("System.DateModified") ' Date Modified: 19.11.2002 09:41:48
Debug.Print "Date Created: " & objWSOPassName.ExtendedProperty("System.DateCreated") ' Date Created: 18.01.2024 17:19:04
Debug.Print "Path: " & objWSOPassName.ExtendedProperty("System.ItemFolderPathDisplay") ' Path: F:\MMPropertyTest
Debug.Print "Name: " & objWSOPassName.ExtendedProperty("System.ItemNameDisplay") ' Name: sample.wmv
Debug.Print "Type: " & objWSOPassName.ExtendedProperty("System.ItemTypeText") ' Type: WMV-Datei
Debug.Print "Version: " & objWSOPassName.ExtendedProperty("System.FileVersion") ' Version:
Debug.Print

' 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://i.postimg.cc/13v6G95B/Ext-Prop-Samples.jpg
5746 https://i.postimg.cc/Xryp365B/Ext-Prop-Samples.jpg (https://postimg.cc/Xryp365B)

From here: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\propkey.h
https://i.postimg.cc/xdVmfPYz/C-Program-Files-x86-Windows-Kits-10-Include-10-0-22621-0-um-propkey-h.jpg
5749 https://i.postimg.cc/68zqzn8W/C-Program-Files-x86-Windows-Kits-10-Include-10-0-22621-0-um-propkey-h.jpg (https://postimg.cc/68zqzn8W)


https://i.postimg.cc/bvbCYCh1/propkey-h.jpg
5748 https://i.postimg.cc/WDN6X7t4/propkey-h.jpg (https://postimg.cc/WDN6X7t4)

MMPropertyTest https://app.box.com/s/27u7dyjee3rez44pdjq52uu2e7tgzu8v

Movie Maker https://app.box.com/s/u26nnuiyz6qyh727e50jsn6dsiyvbmo7
WSO_PropNamesExtended.xls https://app.box.com/s/chq5dk19k67ihlrgirtyev3vsz5c6syc
sample.wmv https://app.box.com/s/k77i9o7eb8ymcvjw1oz39gmdkvuyfieq
propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2
moviemk.exe https://app.box.com/s/f14uc74w8kxmphfn94hjp2k9ygodob97




winsdksetup.exe https://app.box.com/s/4jb97wnawj8ocktkx9209w8gsefp7wnk

DocAElstein
02-03-2024, 02:46 PM
This is post
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=#post23972
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23971&viewfull=1#post23972
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23972
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post239729



Some extra notes for this forum post
https://eileenslounge.com/viewtopic.php?p=313961#p313961 https://eileenslounge.com/viewtopic.php?p=313971#p313971


https://eileenslounge.com/viewtopic.php?p=313961#p313961
>How? By uising the (hidden) ExtendedProperty property ...
… 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)

Microsoft Windows SDK
This is one of those Microsoft things that no one understands because it is too vague and open to interpretation and later change to whatever it ever was, but people who used something that may be somehow or was at some time part of whatever it is, or may have been at any time, will use words as if they know what it is, even though that is impossible. It might be just about possible to say it has things, such as important lists not so typically available or talked about information but that might be necessary for a software developer to make something using Microsoft stuff that might be to the benefit of Microsoft. So a sort of physiological trick to make useful information available to some people in a careful selective way: Microsoft don’t want people to get useful things of theirs working consistently too well. It’s partly useful background long time reliable windows stuff that Microsoft might use themselves but then try to wrap in a way that they can more easily control and sabotage later. It has some similar stuff and ideas to the equally mysterious .Net

I think Mike (SpeakEasy) is a fifth columnist working for Microsoft, feeding us some secrets to gain our trust, then he will drop something on us that will trash all or computers forcing us all to get windows 12 which will just be a wrapper for an artificial intelligence that will take over and control us as its servants.

Anyway, I found after downloading this (https://i.postimg.cc/nhcZ9BrX/Windows-sdk.jpg) , in it somewhere after downloading it, whatever it is, this file here
here: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\propkey.h
https://i.postimg.cc/xdVmfPYz/C-Program-Files-x86-Windows-Kits-10-Include-10-0-22621-0-um-propkey-h.jpg
5749 https://i.postimg.cc/68zqzn8W/C-Program-Files-x86-Windows-Kits-10-Include-10-0-22621-0-um-propkey-h.jpg (https://postimg.cc/68zqzn8W)

That appears to be something of as text file,
https://i.postimg.cc/6q9QGDf2/propkey-h-Properties.jpg
5750 https://i.postimg.cc/34chsf6Y/propkey-h-Properties.jpg (https://postimg.cc/34chsf6Y)

, which I opened with a text editor and saved as a text file
propkey h.txt https://app.box.com/s/q8klctlcfka8s1uecklbf15n75cxc3v2




Took a look at the text file, https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff/page12
https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23981&viewfull=1#post23981 https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23979&viewfull=1#post23979

The TLDR
It’s nicely ordered in text sections like this

// 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 }
Did a macro , Sub ExtendedPropertiesList(), it…
_ REM 1 gets the text file as a long string
_ '1b splits the text up using something that appears to be used once for every property ,
// Name: System.
_ Rem 2 The macro then puts that array of text(string) elements as a simple list in the first column of an Excel file https://i.postimg.cc/QMtxzmJ8/Excel-first-column-List-of-Proph-Keys.jpg , https://postimg.cc/sMkrQpLq/1ed786fd
https://i.postimg.cc/sMkrQpLq/Excel-first-column-List-of-Proph-Keys.jpg (https://postimg.cc/sMkrQpLq)
( I remove wrap text with the macro , so as to make the list and those derived from part of the data a bit more manageable. That way I can reduce the column width and when I put anything in the next column, I don’t easily see all the text, but it is there if I need it. I am mainly interested in having the data somewhere for now.)
( _ Rem 3
I took look in detail at the exact characters in a few of those sections. There were no great surprises in terms of strange characters. https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23981&viewfull=1#post23981 )
_ Rem 4
This demonstrates why in this case a list in an Excel column can be useful, (which I might more usually avoid for performance reasons such as spreadsheet interactions being relatively slow, and simple text file alternative list would be easier to store, share etc.). The Evaluate Range very efficiently picks out the important name part of the propherkeys, for example in the above section example, that would be Size. Here is a full development of that Evaluate range solution, https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23983&viewfull=1#post23983
WSO_PropNamesExtended.xls https://app.box.com/s/sv5rxxtwv1v18ir3xmi6gdti8pawx0jq


' https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23979&viewfull=1#post23979 https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=23983&viewfull=1#post23983
Sub ExtendedPropertiesList()
' Rem 1 Get the text file as a long single string
Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
Dim PathAndFileName As String, TotalFile As String
Let PathAndFileName = ThisWorkbook.Path & Application.PathSeparator & "propkey h.txt" '
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundamental type data input...
' Let TotalFile = Space(LOF(FileNum)) '....and wot receives it has to be a string of exactly the right length
'Get #FileNum, , TotalFile
' Or http://www.eileenslounge.com/viewtopic.php?p=295782&sid=f6dcab07c4d24e00e697fe4343dc7392#p295782
Let TotalFile = Input(LOF(FileNum), FileNum)
Close #FileNum
' 1b Split the Prophs
Dim arrProphs() As String: Let arrProphs() = Split(TotalFile, "// Name: System.", -1, vbBinaryCompare)
' Rem 2 Quick look at list
Dim LCnt As Long: Let LCnt = UBound(arrProphs())
Dim Rws() As Variant, Clms() As Variant, VertList() As Variant
Let Rws() = Evaluate("ROW(1:" & LCnt + 1 & ")/ROW(1:" & LCnt + 1 & ")")
Let Clms() = Evaluate("ROW(1:" & LCnt + 1 & ")")
Let VertList() = Application.Index(arrProphs(), Rws(), Clms())
Let Me.Range("A1:A" & LCnt & "") = VertList()
Me.Cells.WrapText = False
Rem 4
'' 2b) Look at some example props using function WtchaGot_Unic_NotMuchIfYaChoppedItOff
'' The next text is copied from cell A 350
'' "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 }
''
'' "
'' The next text is copied from watch window at arrProphs()(349)
'' : arrProphs()(349) : "Size -- PKEY_Size
'' // Type: UInt64 -- VT_UI8
'' // FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE)
'' //
'' //
'' DEFINE_PROPERTYKEY(PKE"
Rem 3
' Call WtchaGot_Unic_NotMuchIfYaChoppedItOff(arrProphs()( 349), "Size349")

Rem 4 Evaluate Range to get just the property to use in like .ExtendedProperty("System.Size")
Dim arrExtProps() As Variant '
Let arrExtProps() = Me.Evaluate("IF({1},LEFT(A2:A1055,SEARCH("" -- PKEY"",A2:A1055)-1))")
' 3b) Paste into a worksheet column
Let Me.Range("E2:E1055") = arrExtProps()
'Stop
End Sub


A simple coding puts that second column of propherkeys in a text file
https://www.excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA-CSV-stuff?p=23981&viewfull=1#post23981


Conclusions
So from the initial Investigations, It appears that we have 1054 of these things.
In the next posts we review and look in more detail

DocAElstein
02-03-2024, 02:46 PM
This is post
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23973 &viewfull=1#post23973
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23972&viewfull=1#post23973
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4
https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23973

Extended PropherKeys
So it’s time to look at these in detail….
Review
Takes some file or folder, example, sample.wmv https://app.box.com/s/leu06ql1fu9uzt59wnoizedg85qoo7k4 , put it in the same folder as the file that contains this coding. Run the coding.

Sub QuickReviewWSOPropherKeys() ' https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23973&viewfull=1#post23973
Dim WSOobjWSO As Shell32.Shell ' Early Binding
Set WSOobjWSO = 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 WSOobjWSOFolder As Shell32.Folder: Set WSOobjWSOFolder = WSOobjWSO.Namespace(ThisWorkbook.Path)
Dim WSOobjWSOPassName As Shell32.FolderItem: Set WSOobjWSOPassName = WSOobjWSOFolder.ParseName("sample.wmv")
Debug.Print WSOobjWSOPassName.ExtendedProperty("System." & "Size"): MsgBox prompt:=WSOobjWSOPassName.ExtendedProperty("System." & "Size"), Title:="sample.wmv Size Propherkey" ' 643170
Debug.Print
Dim objWSO As Object ' Late Binding
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: Set objWSOPassName = objWSOFolder.ParseName("sample.wmv")
Debug.Print objWSOPassName.ExtendedProperty("System." & "Size"): MsgBox prompt:=objWSOPassName.ExtendedProperty("System." & "Size"), Title:="sample.wmv Size Propherkey" ' 643170
Debug.Print
End Sub

That should tell you that the size of the file, sample.wmv is 643170

DocAElstein
02-03-2024, 02:46 PM
later

DocAElstein
02-03-2024, 02:46 PM
lateer

DocAElstein
02-03-2024, 02:46 PM
later