Get list of subfolders

 From:  vector illustrator (QUARITEXA)
9640.4 In reply to 9640.3 
I tried
code:
var cd = moi.filesystem.getCommandsDir(); 
moi.filesystem.shellExecute('cmd.exe', '/c dir /a:d /b /o:n "' + cd + '" > "' + cd + 'dir.tmp"');

But it displays the shell window. How to suppress it?