Results 1 to 2 of 2
  1. #1
    robby14 is offline Member
    Join Date
    Feb 2010
    Posts
    15
    Rep Power
    0

    Default deletion of files by file type

    Hi
    I need to check for the presence of any html files in a particular directory, and then delete them. However I would not know the filenames of these html files. Is there a way to do it please?

    thanks

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default

    Have a look at the java.io.File.listFiles() methods.
    File (Java 2 Platform SE 5.0)
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

Similar Threads

  1. regarding deletion of spoon-feeding post
    By Fubarable in forum Forum Lobby
    Replies: 7
    Last Post: 03-18-2010, 02:46 PM
  2. retain value of input type file in a jsp file while being dynamically generated
    By nidhi c in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2009, 03:21 AM
  3. Deletion Servlet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-25-2007, 12:23 PM
  4. Massive Hit Deletion Help please
    By quickfingers in forum Java 2D
    Replies: 1
    Last Post: 12-24-2007, 08:49 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
  •