Return Folder Name?

Hello,

I’m currently making a UI for a vehicle selection scene. I’ve categorized everything by Make, Year, Model.
The way it works is that the user selects a make(Mazda, Nissan, Honda…) and the script then looks in that Make folder and lists all the years with an “active.txt” file embedded and creates a button for that particular year. The next step would be to have the user select the year and the script would return all the Models of that year for that make.

But I seem to have troubles figuring out how I can get the script to read the Folder Names and return it to me, I’ve tried looking around to no avail.

Any insight would be great, cheers.

You probably want to take a look at some of the standard .NET System.IO classes. Specifically, to return the sub-folders in a specified folder, take a look at:

Directory.GetDirectories

Also, depending on your other path / directory / file needs, you might find some intersting things in any/all of:

Directory

File

Path