Get your CodeRanch badge!*
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how can i create a java program to view the contents of a dir?
 
Similar Threads
help with dos
create a war file
Deploying WebApplication without WAR
URL to open file system breaks when there is # in it
how to upload a image in particulart directory in web app. server