Find files certain extension java

Find files certain extension java current folder

If you want to find files with certain extension inside folder please use below sample java program. You will two sample java program:

  • FindFilesCertainExtensionCurrentFolder.java: This will find and print list of files which contains *.java extension in current folder only.
  • FindFilesCurrentAndSubDirectory.java: This will find and print all list of files which contains *.java extension in current folder its sub folders.

FindFilesCertainExtensionCurrentFolder.java:

  • Output:

2014-11-30_2028

FindFilesCurrentAndSubDirectory.java:

  • Output:

2014-11-30_2107

For more information delete files please refer oracle documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *