1

I'm using windows 7 ultimate and I want to check on the command line whether or not a file exists inside a zip archive.
I'd prefer if the procedure does not include downloading other stuff.

SuperBiasedMan
  • 9,814
  • 10
  • 45
  • 73
  • 3
    Welcome to SO! This site is mostly designed for very specific problems in your code. Usually, a good question contains a small amount of code, what you tried and what didn't work. If your question doesn't really contain a question and just asks for code, chances are you won't get a reply. – Domino Aug 24 '15 at 13:11
  • Not identical, but very similar question [here](http://stackoverflow.com/questions/17546016/how-can-you-zip-or-unzip-from-the-command-prompt-using-only-windows-built-in-ca/26843122#26843122). – psv Aug 24 '15 at 13:12
  • I have c:\file.zip and file.txt inside that archive. For a normal file I would do if exist c:\file.zip echo file exist But that is a zip archive. In windows command prompt i tried if exist c:\file.zip\file.txt echo file exist But no luck, please someone help me. thank you. – Karthi Keyan Aug 24 '15 at 13:23

1 Answers1

1

try with the zipjs.bat:

call zipjs.bat list -source "C:\myZip.zip" -flat yes|find /i "filename" && (
  echo file does  exists in the zip
  color 
)|| (
  echo file does NOT exists in the zip
)
npocmaka
  • 55,367
  • 18
  • 148
  • 187