Filter file name in Java

import java.io.File;
import java.io.*;

public class ReadFile {
	public static void main(String[] args) {
		try {
			// Create a file object
			File f = new File("C:/OGSAN/N42/1000/2000");

			// Create a FilenameFilter
			FilenameFilter filter = new FilenameFilter() {
				public boolean accept(File f, String name) {
					return name.startsWith("04");
				}
			};

			// Get all the names of the files present
			// in the given directory
			// and whose names start with "12"
			File[] files = f.listFiles(filter);

			// Display the names of the files
			for (int i = 0; i < files.length; i++) {
				System.out.println(files[i].getName());
			}
		} catch (Exception e) {
			System.err.println(e.getMessage());
		}

	}
}

173 thoughts on “Filter file name in Java

  1. Pingback: viagra mail order

  2. Pingback: cialis 20 mg price

  3. Pingback: cialis pills

  4. Pingback: discount cialis

  5. Pingback: Buy cheap viagra online

  6. Pingback: Viagra brand

  7. Pingback: cialis price costco

  8. Pingback: generic cialis cost

  9. Pingback: discount cialis

  10. Pingback: prices of cialis

  11. Pingback: cialis from india

  12. Pingback: viagra 50mg

  13. Pingback: viagra for sale

  14. Pingback: viagra generic

  15. Pingback: best non prescription ed pills

  16. Pingback: best erectile dysfunction pills

  17. Pingback: erection pills viagra online

  18. Pingback: rx pharmacy

  19. Pingback: online canadian pharmacy

  20. Pingback: cialis generic

  21. Pingback: cialis mastercard

  22. Pingback: vardenafil online pharmacy

  23. Pingback: vardenafil 20 mg

  24. Pingback: vardenafil 20 mg

  25. Pingback: hard rock casino online

  26. Pingback: real money casino games

  27. Pingback: online viagra

  28. Pingback: best online casinos that payout

  29. Pingback: casino moons online casino

  30. Pingback: cash advance online

  31. Pingback: pay day loans

  32. Pingback: online loans

  33. Pingback: cialis to buy

  34. Pingback: cialis buy

  35. Pingback: new cialis

  36. Pingback: cialis 20

  37. Pingback: order viagra online

  38. Pingback: casinos online

  39. Pingback: play online casino real money

  40. Pingback: slot machine

  41. Pingback: buy viagra online

  42. Pingback: generic viagra online

  43. Pingback: canadian pharmacy cialis

  44. Pingback: buy viagra online usa

  45. Pingback: price of viagra 100mg in usa

  46. Pingback: sildenafil 50mg brand name

  47. Pingback: brand viagra price

  48. Pingback: order cheap generic viagra online

  49. Pingback: Cialis or viagra

  50. Pingback: buying viagra with mastercard

  51. Pingback: generic viagra cost canada

  52. Pingback: generic viagra 2019

  53. Pingback: Free viagra samples

  54. Pingback: Buy viagra australia

  55. Pingback: essays on the movie the help

  56. Pingback: cialis online

  57. Pingback: thesiswritinghelpsjj.com

  58. Pingback: customessaywriterbyz.com

  59. Pingback: business dissertation topics

  60. Pingback: the help by kathryn stockett essay

  61. Pingback: college application essay services

  62. Pingback: writing thesis

  63. Pingback: write my papers discount code

  64. Pingback: research paper help online

  65. Pingback: Buy viagra on internet

  66. Pingback: buy tadalafil

  67. Pingback: how long does viagra stay in your system

  68. Pingback: viagra for men

  69. Pingback: pharmacy open near me

  70. Pingback: indian pharmacy

  71. Pingback: cheapest generic cialis australia

  72. Pingback: canadian cialis

  73. Pingback: cialis and high blood pressure

  74. Pingback: cialis with dapoxetine cheap

  75. Pingback: buy essay papers

  76. Pingback: master thesis writing service

  77. Pingback: best custom essays

  78. Pingback: cialischeap

  79. Pingback: discount pharmacy

  80. Pingback: generic cialis date

  81. Pingback: blue mountain canadian pharmacy

  82. Pingback: canadian pharmacy no rx needed

  83. Pingback: what exactly does viagra do?

  84. Pingback: regcialist.com

  85. Pingback: amlodipine high blood pressure

  86. Pingback: fluoxetine for depression

  87. Pingback: omeprazole 20 mg dosage

  88. Pingback: quetiapine nursing implications

  89. Pingback: medications used for fibromyalgia

  90. Pingback: pristiq vs lexapro

  91. Pingback: duloxetine how to stop taking

  92. Pingback: viagra alternative

  93. Pingback: viagra for sale

  94. Pingback: canadian pharmacy viagra

  95. Pingback: viagra online

  96. Pingback: viagra prices

  97. Pingback: cialis alternative

  98. Pingback: cialis 24 hours

  99. Pingback: what is lexapro used for

  100. Pingback: where can i buy cialis

  101. Pingback: where can i get cialis online

  102. Pingback: sildenafil 100mg

  103. Pingback: sildenafil generic

  104. Pingback: 1

  105. Pingback: sildenafil 50 mg

  106. Pingback: cialis 2 mg

  107. Pingback: generic viagra 100mg

  108. Pingback: buy viagra online canada with mastercard

  109. Pingback: sildenafil 50mg coupon

  110. Pingback: amoxicillin staph

  111. Pingback: buying cialis cheap

  112. Pingback: herbal viagra

  113. Pingback: sildenafil

  114. Pingback: propecia online india

  115. Pingback: overnight cialis

  116. Pingback: prednisone 40 mg cost

  117. Pingback: viagra pills

  118. Pingback: cialis brand name

  119. Pingback: viagra pill for women

  120. Pingback: how much does ivermectin cost

  121. Pingback: generic viagra 150 mg online

  122. Pingback: buy cialis in canada

  123. Pingback: canada drug sildenafil

  124. Pingback: is ivermectin used to treat scabies

  125. Pingback: liquid stromectol turned yellow

  126. Pingback: cialis price

  127. Pingback: zithramax online fast delivery

  128. Pingback: can you buy ivermectin at a feed store

  129. Pingback: generic viagra in usa

  130. Pingback: can you buy ventolin from asda

  131. Pingback: viagra type medicine for postmenopausal female

  132. Pingback: how do i get ivermectin

  133. Pingback: best way to buy viagra in uk

  134. Pingback: price viagra cyprus

  135. Pingback: tadalafil research

  136. Pingback: mint tadalafil

  137. Pingback: zithromax sinus infection reviews

  138. Pingback: could you buy viagra without a prescription

  139. Pingback: sildenafil walgreens

  140. Pingback: where can i buy lisinopril

  141. Pingback: viagra connect

  142. Pingback: dapoxetine poxet 30

  143. Pingback: azithromycin walgreens over the counter

  144. Pingback: buy viagra online

  145. Pingback: clamelle otc

  146. Pingback: strongest viagra pill

  147. Pingback: viagra no doctor prescription

  148. Pingback: viagra for sale no prescription

  149. Pingback: viagra pfizer

  150. Pingback: viagra receptfritt

  151. Pingback: order prescription viagra online

  152. Pingback: buy amoxicillin 250mg

  153. Pingback: viagra history

  154. Pingback: 90 furosemide

  155. Pingback: buy cheap neurontin

  156. Pingback: plaquenil 200 mg

  157. Pingback: prednisone pills cost

  158. Pingback: viagra cialis

  159. Pingback: priligy 60mg

  160. Pingback: cheap modafinil

  161. Pingback: ivermectin price

  162. Pingback: ventolin 108

  163. Pingback: buy zithromax

  164. Pingback: lasix 500 mg tablet

  165. Pingback: gabapentin 500 mg

  166. Pingback: plaquenil 400

  167. Pingback: viagra bestellen

  168. Pingback: 20mg prednisone

  169. Pingback: priligy tablets

  170. Pingback: stromectol cream

  171. Pingback: viagra government funded

  172. Pingback: viagra cock

  173. Pingback: viagra no prescription

發表迴響