Tagged 'full dir'

Get list of all subfolders

0 votes

-- How to get list of all sub folders in special path --

function GetAllSubDirs_fn MyDirectory =
(
temp = #();
s = 1;
folders = getDirectories (MyDirectory + "/*");
t = folders.count;
while s < t do
(
for i = s to t do (temp = getDirectories (folders[i]+"*");
for j = 1 to temp.count do folders[folders.count+1] = temp[j] );
s = t;
t = folders.count;
)
sort folders
return folders;
)
-- call the function whit a folder path --

GetAllSubDirs_fn("D:")

Syndicate content