Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] file count

From: ammon:addept:ws at: 14-Dec-2002 15:26

Hi, I am attempting to write a function that will count the files and the directoried inside of a given directory, but somewhere it is killing me in recursion. Here is the function: file-counter: func [file [file!] /init][ if init [filecnt: folcnt: 0] foreach f read file copy/deep[ either dir? f [ folcnt: folcnt + 1 file-counter probe append copy file f ][ filecnt: filecnt + 1 ] ] print filecnt print folcnt ] The probe in their shows me that it is only getting one level deep and only goes through the first three folders then kills. Any ideas? Thanks!! Ammon Johnson --- CIO Addept ------------------ (www.addept.ws) 435-616-2322 -------- (ammon at addept.ws)