You could alternatively try to untar just the file you want to check. This might result in a build failure, that you can catch with antcontrib
-----Ursprüngliche Nachricht----- Von: Ben Tu [mailto:ben...@gmail.com] Gesendet: Freitag, 6. Mai 2011 18:09 An: user@ant.apache.org Betreff: How can I check if file exists in gz compress file? Hi, Is there a task in Ant that I can check if the file exists in myfile.tar.gz file without extracting it? Here is the content of myfile.tar.gz after extracted. Dir1/ fileA fileB dir2/ fileC I want to check if fileC exists in myfile.tar.gz without extracting myfile.tar.gz. is there such a task in Ant for this purpose? thanks, Ben --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org