It's not a secret anymore!*
The moose likes Beginning Java and the fly likes how can i create a java program to view the contents of a dir? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how can i create a java program to view the contents of a dir?" Watch "how can i create a java program to view the contents of a dir?" New topic
Author

how can i create a java program to view the contents of a dir?

thangam malathy sharmi
Greenhorn

Joined: Feb 03, 2005
Posts: 2
how can i create a java program to view the contents of a dir?

for example if i require like
[root]
[dir name ="xyz"]
[file]f1.doc[/file]
[file]f2.doc[/file]
[dir name="abc"]
[file]f3.doc[/file]
[/dir]
[/dir]
[/root]

regards
sharmi
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Go through this File

and then, use methods...

isDirectory
isFile
and list ...

Lets us know your progress .......

Cheers,
Vijay
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can i create a java program to view the contents of a dir?