viewpoint-particle

Author Topic: DirInfoToArray  (Read 49 times)

jmburton2001

  • Jr. Member
  • **
  • Posts: 59
DirInfoToArray
« on: October 07, 2019, 07:19:40 am »
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

  • Tech Support
  • *****
  • Posts: 3079
    • WinBatch
Re: DirInfoToArray
« Reply #1 on: October 07, 2019, 08:13:28 am »
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

  • Jr. Member
  • **
  • Posts: 59
Re: DirInfoToArray
« Reply #2 on: October 07, 2019, 08:35:17 am »
Thank you!