Results 1 to 1 of 1
Thread: search file inside Zip, Rar file
- 03-21-2009, 08:36 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
search file inside Zip, Rar file
Good AfterNoon Friends,
I am new to this Forumn and friend I have one problem
I want to search file from the hard disk the file is searching properly, But I want that if same extension file is located inside the zip, rar file then it show me in the search result.
Currently I am searching only doc file and i create a zip file in which one doc file, but on searching it not show me that file..
Even I used this code for searching file inside the zip file..
// passing filename to Zipfile...
ZipFile zf = new ZipFile(file);
for (Enumeration entries = zf.entries(); entries.hasMoreElements(); {
zipEntryName = ((ZipEntry)entries.nextElement()).getName();
fileExtension = zipEntryName.substring(zipEntryName.lastIndexOf(". ") + 1);
for(String fileType : fileTypes){ //fileTypes is an array where i specify searching file type(currently doc file)
if(fileType.equals(fileExtension.toLowerCase())){
addFile.add(currentFile.getName());
noOfFiles++;
}
}
}
highly appreciated your help
Thanks in advance...
Similar Threads
-
Search in text file
By mark-mlt in forum New To JavaReplies: 6Last Post: 04-03-2009, 04:33 PM -
Creating File inside a Directory
By viswanadh7 in forum AWT / SwingReplies: 1Last Post: 03-17-2009, 02:22 AM -
Search a text file
By javanewbie1979 in forum New To JavaReplies: 15Last Post: 02-09-2009, 04:46 PM -
Search a word(taken from one file) in another file and give the line as the output
By SwapnaNaidu in forum New To JavaReplies: 7Last Post: 11-19-2008, 02:09 PM -
File Search
By Juggler in forum New To JavaReplies: 2Last Post: 07-19-2008, 04:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks