I have some code that will return file names over a certain character count. What I am trying to do is take that to the next level and have it crawl into subfolders of that directory as well. The problem is I end up with some Frankenstein code that in the end doesn't work. Below is the working, first level of the directory code. Any tips would be great.
[ September 28, 2007: Message edited by: Mark Runals ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35232
7
posted
0
What you need is a recursive method that can call itself as it descends into the directory tree. The general structure would be something like this:
[ September 28, 2007: Message edited by: Ulf Dittmer ]
Sorry I should have been clearer. I understand I need to put in a recursive method. The issue I have is trying to take examples from the web and and modify them or create one myself and have it actually work - thus the Frankenstein code reference.
Mark Runals
Greenhorn
Joined: Aug 15, 2007
Posts: 5
posted
0
For posterity here is what I came up with. Am sure there are better ways to do this.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Listing files in directory (and subdirectory)