I was pleasantly surprised by how simple this turned out to be. dirtree and dirpath are both defined in the standard library 'dir'. i.e. you need to require 'dir' before this will work.
!!!!!Use with caution!!!!!!
deleteDirTree=: 3 : 0
try.
res=. 1!:55 {."1 dirtree y
res=. res,1!:55 |.dirpath y
catch.
13!:11 ''
end.
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
