|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
File search
i would like to make a file search on my disk like this
*.txt *.mp3 etc. or name.* can anyone tell me any tutorial on how to accomplish this task? |
|
#2
|
||||
|
||||
|
I do not know of a tutorial right now but I think you could be able to solve your problems with the String[] list(FilenameFilter filter) method of the File class.
http://java.sun.com/j2se/1.5.0/docs...FilenameFilter) |
|
#3
|
||||
|
||||
|
Some online examples:
http://www.codeguru.com/java/tij/tij0111.shtml http://javaalmanac.com/egs/java.io/GetFiles.html?l=rel If you want to recursively scan subdirectories as well: http://javaalmanac.com/egs/java.io/...Tree.html?l=rel |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > File search |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|