ScriptSpot

Tutorial

Get list of all subfolders

By Nevil · 2013-03-10

Votes
1
Description

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

Tags: sub folder, full dir, getdir, get subfolders, getdirectories

Comments (2)

Hi, why don't show complete

MREZA · 2014-11-24

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.

can you explain more

Nevil · 2014-12-15

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 NevilArt@Gmail.Com )