REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Work on directory trees





 
/* example for working on a directory tree without loading the dll    */
/* REXXUTIL                                                           */

                        /* put a list of all directories in the queue */
                        /* (use /FIFO to get the directories in the   */
                        /*  right order)                              */
  "@dir /s/f /Ad C:\ 2>NUL | RXQUEUE /FIFO"

  foundDirs.0 = 0
                    /* put the names of all found directories         */
                    /* in a compound variable for further processing  */
  do while queued() <> 0
    curDir = strip( lineIn( "QUEUE:" ) )
    if curDir <> "" & ,
       right( CurDir, 2 ) <> "\."  & ,
       right( CurDir, 3 ) <> "\.." then
    do
      j = foundDirs.0 + 1
      foundDirs.j = curDir
      foundDirs.0 = j
    end /* if curDir <> "" then */
  end /* do while queued <> 0 */

  

Inf-HTML End Run - Successful