Unzip command in batch file

Hi,
I have wrote a batch file that extract a zip archive in to c:\windows\system32\drivers. Here is the content of unzip.bat:

unzip patch1.3.zip -d C:\Windows\System32\drivers

but when I double click the unzip.bat file, a command window opens and infinitely write these:

D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
.......
.......

What is the problem?
4 answers Last reply
More about unzip command batch file
  1. thanks for that. PKZIP/PKUNZIP are more suitable
  2. mahmood said:
    Hi,
    I have wrote a batch file that extract a zip archive in to c:\windows\system32\drivers. Here is the content of unzip.bat:

    unzip patch1.3.zip -d C:\Windows\System32\drivers

    but when I double click the unzip.bat file, a command window opens and infinitely write these:

    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    D:\mahmood\Desktop\sample>unzip patch1.3.zip -d C:\Windows\System32\drivers
    .......
    .......

    What is the problem?


    Hi mahmood insatll unzip.exe
    please send mail to this if any issues with unzip command Nikil1229@gmail.com


    thanks,
    Nikhil@photon
  3. if the zip file is in c drive give like this unzip c:\filename.zip -d C:\filenamewhich u want

    Thanks
    Nikhil@phresco
Ask a new question

Read More

Desktops System32 Command Prompt Zip Windows XP