Hi,
Welcome to JavaRanch!
First, a bit of business: you may not have read our
naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. Initials aren't enough. You can change your display name
here. Thanks!
Anyway: why do you think using the File object will limit the depth of the recursion?
You should be able to do this using Files quite easily. If you can't -- well, if you can't, then you can't do it at all, as that's the only way that
Java provides for accessing directory contents.