excluding folder paths

  • Hello, this post is in response to here: List files macro, need to add exclude specific subfolder in it


    Code
    excludedSubfolders As String = ""

    What does the above line mean? and also,


    What exactly is the above code doing here?

  • Hi,


    Not sure what your question is.


    But, If you create a new function as below where we are calling the function and pass the parameters, it will search the string "dog" in array myanimals in the function and return the index/ position of substring.


    Thanks,

    Saurabh

  • my original question was regarding this post: List files macro, need to add exclude specific subfolder in it


    First, It seems like when I tested this macro, it doesn't seem to work for folder names with spaces in them for example "C:\test 1"

    Next, it only seems to exclude top level directory folders, not deeper nested folders within the parent directory. How can this macro be adjusted to exclude deeper nested subfolders?

    Next, how can I make this macro display folder paths in addition to the file paths including the path of the parent folder?

    Next, when excluding a folder with no files in it, the other file paths in different subfolders get duplicated. How can this be fixed also? it seems like alot is wrong with this code that I wish to extend functionality for.


    I am attaching 2 pieces of code that I used in seperate workbooks so you can see what functionality I want added



Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!