• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Searching

 
Faye Abdon
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! If anyone could help me with this, it would be much appreciated. How can i know the number of files with .txt extension existing in my directory? I tried using FileReader but it only reads one specific file. Please help.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read all the methods of the java.io.File object.
http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html
[ November 18, 2005: Message edited by: Ben Souther ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the I/O and Streams forum.

Dave
 
payal agrawal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lok at the URL below.

How to get the list of specific file types in a directory
http://www.java-tips.org/content/view/599/2/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic