+ Reply to Thread
Results 1 to 5 of 5

Document Tree Generator - Misses Empty Files

  1. #1
    Registered User
    Join Date
    09-03-2015
    Location
    Yorkshire
    MS-Off Ver
    2016 32bit
    Posts
    43

    Document Tree Generator - Misses Empty Files

    Hi,

    First of all, much credit to Robert Mundigl @ www.clearlyandsimply.com
    I've been using the attached spreadsheet of his to generate a list of all documents & the files they are in - which allows me to use my basic VBA skills to make it automatically organise into a document tree.

    However, the code does not generate an item for folders on the system which contain nothing - it skips them instead.

    I'm currently having to manually check the system, then insert a new row on the spreadsheet and put in a value [EMPTY].

    I need to see which folders on the document tree are empty - so this is essential.


    So the values it would output would look like:

    C:\stuff\morestuff\document.exe
    C:\stuff\morestuff\document2.exe
    C:\stuff\otherstuff\[EMPTY]
    C:\stuff\yetmorestuff\document3.exe

    or something similar.


    This is beyond my basic VBA skills - any help would be appreciated!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Document Tree Generator - Misses Empty Files

    Hello TinyDamooge,

    The current workbook has a few issues that needed fixing. This version gives you more information and lets you open a file by double clicking on the cell,
    and choosing the search depth of the subfolders. The results will tell you the following: the number of files, folders, empty folders, and the time spent searching. Empty folders
    are shown as (Empty) for the file name in column "A" and the file path is shown in column "B". This version also handles compressed files (.zip, .cab, .rar, etc.) correctly.

    Okay, having issues uploading files again. You can download the workbook from my account here MediaFire
    Last edited by Leith Ross; 02-05-2018 at 05:53 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-03-2015
    Location
    Yorkshire
    MS-Off Ver
    2016 32bit
    Posts
    43

    Re: Document Tree Generator - Misses Empty Files

    Thanks for the response Leith!

    I gave your spreadsheet a go, it's great that it finds empty folders too.
    Unfortunately I had problems straight from the start - As the attached (sanitized) image shows.

    Bearing in mind the folder I chose was empty apart from folder containing more folders of files
    • Files were being generated with no folder path
    • File types was being put into the 'File Size' column sometimes. Sometimes not.
    • File size results were being inputted into the file Type column,

    Mainly the first point - I couldn't understand where the results were coming from.
    Attached Images Attached Images

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Document Tree Generator - Misses Empty Files

    Hello TinyDamooge,

    Obviously here is some difference between our setups. I am running Office 10 on Windows 7. You did not provide any information about your setup in either your profile or your post. It makes it difficult to determine if the problem is related to differences in software or hardware without this information.

    I have run the workbook on all storage devices on my computer: hard drive, USB, SSD, and local network with no problems. The picture you posted of your results shows the files are in a ZIP archive. As to why the folder path is missing, I have no idea. I need more information about your system to determine the cause.

  5. #5
    Registered User
    Join Date
    09-03-2015
    Location
    Yorkshire
    MS-Off Ver
    2016 32bit
    Posts
    43

    Re: Document Tree Generator - Misses Empty Files

    Hi Leith,

    I recently upgraded to Excel 2016 MSO (16.0.8201.2213) 32-bit on Windows 7 Enterprise
    Part of a Microsoft Office 365 ProPlus Subscription.
    Version 1705 (Build 8201.2213 Click-to-Run)

    I don't mind if a ZIP folders subfolders aren't listed - they could be just be listed at a top level, like I believe the 1st spreadsheet might have done.

    I might have a mess with part of your sub 'ListAllFiles'
    See if I can integrate the "'Check if Folder has no files." section into my original spreadsheets code...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Loop excel files and sort it in a tree diagram
    By Afandi1992 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2015, 08:01 AM
  2. [SOLVED] Transforming 1level coded product tree to few level product tree
    By Gukupozu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-07-2015, 10:31 AM
  3. Serial number generator for document (application form)
    By jaysakle in forum Excel General
    Replies: 2
    Last Post: 03-04-2014, 03:51 AM
  4. generator of files with userform and Access
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2013, 04:03 PM
  5. [SOLVED] While writing files from another workbook, keep empty cells empty!
    By nivoe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2012, 12:25 PM
  6. Excel 2007 : "Inspect Document" misses hidden rows
    By beng404 in forum Excel General
    Replies: 1
    Last Post: 06-26-2012, 02:50 PM
  7. Replies: 12
    Last Post: 12-28-2005, 06:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1