% % create a new monad root tree % % % import dirs as 1st tier tree nodes % empty %%% _here "Source\" ofbin { seq121 File.NextDirOf % % stack: srch-dir next-dir % isnull ? "__" atleft( { % % is one of the dirs within Robot to add to first tier of tree % dup -2 left upper root\ newchild % % cycle through all text files within the directory, % adding as children of the directory nomer % % stack: srch-dir next-dir % empty "*.txt" ^"\" ^3 ^4 "Reverse" File.List execstr % % stack: empty [ filen . . . file1 ] { isnull ? % % process this file as child of directory % *callings } loop pop } { % % skip this dir % } ifelse exch } loop pop % % stack: srch-dir % pop