I need to populate an HTML Select list to show folder names.
I have found and would like to use this C# sample code on: http://msdn.microsoft.com/en-us/library/s7xk2b58.aspx
public class GetDirectoriesTest
public static void Main()
// Make a reference to a directory.
DirectoryInfo di = new DirectoryInfo("c:\\");
// Get a reference to each directory in that directory.
DirectoryInfo diArr = di.GetDirectories();
// Display the names of the directories.
foreach (DirectoryInfo dri in diArr)
I need a way to call this function via script and pass it a folder path and have it return the list of desired folders.
Then I need a way to populate the list based on the directories returned.
as an example, the end result should look something like this:
<option value="2011-2012" >2011-2012</option>
<option value="2010-2011" >2010-2011</option>
<option value="2009-2010" >2009-2010</option>