var cd = moi.filesystem.getCommandsDir(); moi.filesystem.shellExecute('cmd.exe', '/c dir /a:d /b /o:n "' + cd + '" > "' + cd + 'dir.tmp"');