DirInfoToArray

Started by jmburton2001, October 07, 2019, 07:19:40 AM

Previous topic - Next topic

jmburton2001

Is there a way to have DirInfoToArray go deeper into the file structure?

I'm trying to pull artists and albums out of my music directory. The file structure is setup as "Music\Artist\Album"



But the best I can do with DirInfoToArray is "Music\Artist" and I'd also like to get the album.



Using the artist "3 Doors Down" as an example I'd like to extract:

  • H:\Music\3 Doors Down\Away From the Sun
  • H:\Music\3 Doors Down\Let Me Go
  • H:\Music\3 Doors Down\The Better Life

Any tips, tricks, pointers (or sample code ;) ) would be greatly appreciated!

td

Assuming you are using DirInfoToArray because you want more than just directory name from the function, you simply need to use recursion to walk the directory tree.  Search the Tech Database using "directory recursion" for examples.  They may not contain the "DirInfoToArray" function but the examples do demonstrate the concept of recursing through the file system.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

jmburton2001