Page 2 of 22 FirstFirst 123412 ... LastLast
Results 11 to 20 of 214

Thread: YouTube, Video making and editing, etc. coupled to excelfox ( windows Movie Maker )

  1. #11
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    "XP era" Versions and some initial investigations

    Thread 2936 https://www.excelfox.com/forum/showt...-Maker-)/page2
    https://www. excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2


    This is post #post23772
    https://www.excelfox.com/forum/showt...age2#post23772
    https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23772








    XP era versions



    (2001) - Version 1.1 https://i.postimg.cc/NMdM0bF8/Movie-...ersion-1-1.jpg
    Version 1.1 was included in Windows XP, 25 October 2001 as part of Windows XP, and included support for creating DV AVI and WMV 8 files.

    (2002) - Version 2.0 ( Sometimes regarded as XP version ) https://i.postimg.cc/2886gsHH/Movie-Maker-version-2.jpg

    Version 2.0 was released as a free update to 1.1, in November 2002, and added a number of new features. It went some way to answering critic on the first version, and often the Classic/Start of Movie Maker around close to XP start time is regarded as the version 2 – version 2.1 era. –

    (2004) - Version 2.1 ( Windows XP Service Pack 2 ) https://i.postimg.cc/L4V5C9VY/Movie-...ersion-2-1.jpg
    Version 2.1, a minor update, is included in, so coming from installing, Windows XP Service Pack 2

    (2001-2006 overlap) ( Windows Vista development time from before XP in 2001 to final release of Vista in 2006 )
    The overlap and confusion may have resulted from the design teams being drunk in between times: Microsoft originally expected to ship Vista sometime late in 2003 as a minor step between Windows XP (codenamed "Whistler") and the next planned major release of Windows, code-named "Blackcomb". Vista's original codename, "Longhorn", was an allusion to this plan, a sort of inbetween idea: While Whistler and Blackcomb are large ski resorts in British Columbia, Longhorn is the name of a bar between the two mountains that Whistler's visitors pass to reach Blackcomb.

    2004
    A Windows Presentation Foundation (WPF) version of Windows Movie Maker was also included in some development builds of Vista (at the time codenamed "Longhorn"), but was removed in the development reset in August 2004. After the development reset, (the interface for the WPF-based Windows Movie Maker was retained in Windows Vista later)

    (2005) - Version 2.5 https://i.postimg.cc/NjK0j1vm/Version-2-5.jpg , https://i.postimg.cc/3JSRhtV3/Versio...ransitions.jpg

    The Movie Maker in Windows XP Media Center Edition 2005 had more transitions and support for DVD burning.

    ( (2006) - Version 6.0 ( 2.7 )
    The next main version is Windows Movie Maker 6.0 which had both a 64-bit version and GPU rendering of effects and transitions. It was released as part of Windows Vista, https://www.youtube.com/watch?v=GqzeFYWjTxI&t=17s (Vista started in 2006), and – like most Windows components – reported version number 6.0.6000, same as Windows Vista itself. https://i.postimg.cc/23RzWFyz/GB-Movie-Maker-6.jpg

    It included new effects and transitions, support for playback on the Xbox 360,and support for the DVR-MS file format that Windows Media Center records television in. The HD version in Premium and Ultimate editions of Windows Vista also added support for capturing from HDV camcorders. The capture wizard also created DVR-MS type files from HDV tapes. However, the Windows Vista version of Windows Movie Maker removed support for importing video from an analog video source such as an analog camcorder, VCR or from a webcam. There is no "2.7 XP version". People may incorrectly be referring to the Windows Vista version of Windows Movie Maker 2.6 that is basically a CPU-only version using the XP code for those on Vista that didn't have a powerful enough GPU. As some older systems might not be able to run the new version of Windows Movie Maker. Vista at the end of the final pre-release development stages may also have been code-named 2.7
    )

    (2007) - Version 2.6 https://i.postimg.cc/HLxZ8ksq/Version-2-6.jpg

    So, Microsoft also released an updated older version 2.6 for Windows Vista on Microsoft Download Centre, possibly around 2007-2009. This version is basically the same as Windows Movie Maker 2.1 and included all of the old effects and transitions, but it excludes the ability to capture video. It can only be installed on Windows Vista and is only intended for use on computers where the hardware-accelerated version cannot run. 2.6 is very similar to 2.5, as it was, or at least is often referred to as, a refurbished XP version 2.5

    (2008) - Version 2009
    Around 2008-2009, when windows 7 started, it seems that some further development was done on windows movie maker. The word Live started to crop up…
    (2008) - Version 2009
    Windows Live Movie Maker. Windows Live Essentials
    As for the "Windows Live" version, A new version of the software, renamed Windows Live Movie Maker 2009, was released as a beta on September 17, 2008, and officially released as a standalone product through Windows Live Essentials suite on August 19, 2009.
    Windows Live Movie Maker 2009 is officially the last version to support Windows XP, ( Windows Live Photo Gallery version 14.0.8117.416 )
    Last edited by DocAElstein; 01-23-2024 at 02:30 PM.

  2. #12
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    Version 1


    This is post #post23771
    https://www.excelfox.com/forum/showt...age2#post23771
    https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23771



    Last edited by DocAElstein; 01-05-2024 at 01:58 AM.

  3. #13
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    2.0


    This is post #post23776
    https://www.excelfox.com/forum/showt...age2#post23776
    https://www.excelfox.com/forum/showthread.php/2936-YouTube-Video-making-and-editing-etc-coupled-to-excelfox-(-windows-Movie-Maker-)/page2#post23776






    Version 2
    I only found 1 so far, masquerading as a 2.6 here:
    https://archive.org/details/wmm2installer
    This is the important download from there, https://archive.org/details/wmm2installer , https://app.box.com/s/1tddomgrqyfm5h97sdtmz8vvhgpohrrv , from late 2002. It may have been updated around April 2008.
    The files it has, shown below, are very similar to those for 2.1, 2.5, 2.6
    Code:
      _____ Workbook: Movie Maker Versions.xls ( Using Excel 2013 32 bit )
    
    WMM2ERES.dll WMM2RES.dll license.txt MovieMk.chm
    4 KB 4.05 KB 8,16 KB 714 KB
    Jewano install 2 5 Dec 2023 Erstellte 13 Aug 2009 20.12.2002 20.12.2002 Textdokument Kompilierte HTML-Hilfedatei
    \ archive org details wmm2installer\Jewano Install Dec 5 2023 wmm2installer.exe 5.50.4134.600 12.286 11.9 12.580.696 12.0 12.582.912 2.0.3312.0 2.0.3312.0 27.01.2003 27.11.2002
    Name Movie Maker 1033 moviemk.exe MUI sample.wmv Shared WMM2AE.dll WMM2ERES.dll WMM2EXT.dll WMM2FILT.dll WMM2FXA.dll WMM2FXB.dll WMM2RES.dll WMM2RES2.dll
    13.1 15.1 15.854.032 15.1 15.888.384 3,21 MB 628 KB 164 KB 4,00 KB 7,50 KB 393 KB 490 KB 318 KB 4,09 MB 6,00 KB
    Elementtyp Dateiordner Dateiordner Anwendung Dateiordner Windows Media-Audio-/Videodatei Dateiordner DLL-Datei DLL-Datei DLL-Datei DLL-Datei DLL-Datei DLL-Datei DLL-Datei DLL-Datei
    Änderungsdatum 05.12.2023 05.12.2023 20.12.2002 05.12.2023 19.11.2002 05.12.2023 14.04.2008 14.04.2008 14.04.2008 14.04.2008 14.04.2008 14.04.2008 14.04.2008 14.04.2008
    Dateiversion 2.0.3312.0 2.1.4026.0 2.1.4026.0 2.1.4026.0 2.1.4026.0 2.1.4026.0 2.1.4026.0 2.1.4026.0 2.1.4026.0
    Worksheet: 2 2.1 (2.5)
    https://i.postimg.cc/SQLdw105/Version-2-Files.jpg


    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-...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=jTmV...8sZ9zYqog9KZ5B
    https://www.youtube.com/watch?v=jTmV...UOM9zYlZPKdOpm

    Also notes on the basic coding using the windows Shell object can be see here https://www.excelfox.com/forum/showt...ll=1#post23920
    Last edited by DocAElstein; 01-20-2024 at 06:46 PM.

  4. #14
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    Versions 2.1 (2.5)


    This is post #post23777
    https://www.excelfox.com/forum/showt...age2#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
    Last edited by DocAElstein; 01-26-2024 at 02:33 PM.

  5. #15
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    This is post #post23775
    https://www.excelfox.com/forum/showt...age2#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-...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=jTmV...8sZ9zYqog9KZ5B )

    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

    Code:
    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
    Last edited by DocAElstein; 01-21-2024 at 04:01 AM.

  6. #16
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    "Reoccurring Routine" / "Recursion technique"


    This is post#post23774
    https://www.excelfox.com/forum/showt...age2#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/showt...ll=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
    Code:
    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
    Code:
    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.
    Last edited by DocAElstein; 01-21-2024 at 04:02 PM.

  7. #17
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10
    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
    Code:
    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-...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-...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
    Last edited by DocAElstein; 01-21-2024 at 07:55 PM.

  8. #18
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    This is post#post23768
    https://www.excelfox.com/forum/showt...age2#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/Versio...ub-folders.jpg


    Applying the advanced recursion coding to the same gives this:
    https://i.postimg.cc/ZnyR2Mgd/Versio...ub-folders.jpg



    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/Explor...evels-view.jpg


    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: - 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/Versio...els-offset.jpg Version 2 advanced full levels property Movie Maker files and (sub)folders with Levels offset.JPG



    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 3 view comparison.jpg



    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/showt...ll=1#post23923
    Last edited by DocAElstein; 01-26-2024 at 02:20 PM.

  9. #19
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10

    YouTube, Video making and editing, etc. coupled to excelfox ( windows Movie Maker )


    This is post#post23769
    https://www.excelfox.com/forum/showt...age2#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-...erties-way.jpg
    https://eileenslounge.com/viewtopic....313555#p313555
    Movie Maker 2 Properties from Right Click --- Properties way.jpg )

    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....313622#p313622
    https://eileenslounge.com/viewtopic....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/showt...ll=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) , 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/showt...s-etc-)/page17
    https://eileenslounge.com/viewtopic....313792#p313792
    https://eileenslounge.com/viewtopic....313792#p313792
    https://www.excelfox.com/forum/showt...s-etc-)/page18
    Last edited by DocAElstein; 01-27-2024 at 12:47 AM.

  10. #20
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,389
    Rep Power
    10
    c,,cbs
    Last edited by DocAElstein; 01-26-2024 at 02:22 PM.

Similar Threads

  1. Notes tests, Scrapping, YouTube
    By DocAElstein in forum Test Area
    Replies: 221
    Last Post: 10-02-2022, 06:21 PM
  2. Gif Image Video stuff testies
    By DocAElstein in forum Test Area
    Replies: 13
    Last Post: 09-06-2021, 01:07 PM
  3. Test excelfox Corruptions January 2021 *
    By DocAElstein in forum Test Area
    Replies: 13
    Last Post: 01-25-2021, 08:07 PM
  4. Replies: 161
    Last Post: 04-24-2019, 11:47 AM
  5. Replies: 8
    Last Post: 08-17-2013, 02:42 PM

Posting Permissions

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