aspose file tools*
The moose likes Beginning Java and the fly likes recursive methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "recursive methods" Watch "recursive methods" New topic
Author

recursive methods

Ravindra Suroju
Greenhorn

Joined: Mar 11, 2008
Posts: 14
Hi all,

I want to print the absolute path of all files (including the files in subfolders) in a given directory [C:/Source]. Please help me what is wrong with my code...



Best Regards,<br />Ravindra.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3169
    
  10
What makes you thing there's something wrong with it ? Does it not compile (show us the error messages) or does it not do what you expected (tell us what it does do and how this differs from what you expected).


Joanne
Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
1) Class names should begin with a capital (Test not test)
2) Instance variables should be non capitalized (directory not Directory, path not Path)
2) You have provided no comments
3) directory.getDirectoryList("/" + args[0]); <== corrected
4) File tempFile = new File(path + "/" + dirContents[i]); <== corrected

You were very close.
Ravindra Suroju
Greenhorn

Joined: Mar 11, 2008
Posts: 14
Thanks so much Bob...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: recursive methods
 
Similar Threads
File Class question
No more files
why it throws NullPointerException
javac -cp legal?
File filter without empty directory