search files


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: search files

  1. #1
    Join Date
    Mar 2006
    Posts
    1

    search files

    hi
    I want to search all the text file in the pc by using Java.Is any body can help me to solve this pls? It is for my project, i have to display all the text files in the computer.
    Last edited by aravi; 03-18-2006 at 09:28 AM.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    What's your plan of attack?

  3. #3
    Join Date
    Mar 2006
    Posts
    12
    Hi I also need to seach all txt files in any particular folder, including files in subfolders.
    PLEASE HELP,, give the code

  4. #4
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    Take a look at the methods of the java.util.File class to handle folders and files. Do a search of all files inside of all folders and subfolders - for each file you'll have to open it into a stream to be processed, then close and move to the next.

  5. #5
    Join Date
    Mar 2006
    Posts
    12
    Can anyone PLEASEEEEEE give a sample code... AM NEW AT JAVA PROGRAMMING... dont know much

  6. #6
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    But you know enough to beg for someone to do your work for you?

    There are plenty of code listings available as a result of a search on Google or other search engine, if all you're interested in is copying or passing someone else's work off as your own.

  7. #7
    Join Date
    Mar 2005
    Location
    UK, London
    Posts
    150
    heres a smaple program that will get u started. hopfully. I just want to say that people here or on anyother forum will not write out code for people unless its very small. you need to put some effort in and produce some code.

    http://www.java.codeyourself.com/Download.php?ID=28

Similar Threads

  1. Help! Need to Know how to search for types of files!!
    By jobartley515 in forum VB Classic
    Replies: 0
    Last Post: 07-14-2005, 02:36 PM
  2. XML files vs Database
    By Mansoor in forum XML
    Replies: 8
    Last Post: 08-23-2002, 05:35 PM
  3. Replies: 0
    Last Post: 03-13-2001, 02:54 PM
  4. Search page for localized files?
    By Dana in forum ASP.NET
    Replies: 0
    Last Post: 12-08-2000, 04:53 PM
  5. Replace In Files utility released
    By René Whitworth in forum vb.announcements
    Replies: 1
    Last Post: 04-29-2000, 03:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center