File.FindFolders
Skip to content
mnscript
string[] File.FindFolders(string) 

Description ​

Returns an array of folders in the given directory.

Arguments ​

string - The directory to search.

Returns ​

string[] - An array of folders found in the directory.

Example ​

msc
using File;
using Console;
using Array;
using Util;

// Finds the folders in "r" and prints them to console.

string[] folders = File.FindFolders("r");
number numFolders = Array.Length(folders);
number folderIndex = 1;

Console.WriteLine("Found "..Util.ToString(numFolders).." folders!");

while(folderIndex <= numFolders){
    Console.WriteLine("File: "..folders[folderIndex]);
    folderIndex = folderIndex + 1;
}