Get list of all subfolders

1 vote
Author: 
Nevil

-- 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:")

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Nevil's picture

can you explain more

if you explain a little more, I`ll be able to help.

( if you cant explain in English do it in Persian or Turkish and send it to my email [email protected] )

MREZA's picture

Hi, why don't show complete

Hi, why doesn't it show the complete vmpp window in 2013max??(don't show material in vmpp window) I can't speak English fluently.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.