Results 1 to 2 of 2

Thread: WinRAR command line to unzip files in multiple directories

  1. #1
    Join Date
    Aug 2011
    Posts
    3

    Exclamation WinRAR command line to unzip files in multiple directories

    Friends, I enter with hope!

    I have created a batch file to unzip the zip files within multiple folders in a parent directory using WinRAR.

    @echo off

    FOR /D /r %%G in (*) DO if exist %%G\*.zip C:\progra~1\WinRAR\Winrar.exe e %%G\*.zip %%G\

    pause
    exit
    How it works

    This works, and the files are extracted to the same folder. For example, I have a parent folder by name Parent, a subfolder by name Child and under that, a zip file by name zipfile.zip. This batch extracts the files in the zip file into the folder Child. This works in any given parent and child folder.

    What I expect

    I wish the batch to create a folder by name zipfile (the variable name of the zip file) within the Child folder. The files should be extracted into the newly created folder. This hsould work in any given parent and child folders.

    I had tried the X command instead of the E in the command line, however, it doesnt seem to help. When we select multiple zip files and right-click, a WinRAR command is available to extract each archive to a separate folder. I need something of that sort to work for zip files across multiple folders, yet retaining the tree structure.

    Thank you in advance. I know you guys are very very smart and will solve it in no time.
    Last edited by jymoo; 23-08-2011 at 07:09 PM.

  2. #2
    Join Date
    May 2009
    Posts
    543

    Re: WinRAR command line to unzip files in multiple directories

    You can do this more easily by using WinZip command line utility. This tool has automated system to create a batch file as per your requirement for unzipping the zip files. This tool has simple to use GUI mode where you can manually choose the files and folder and also the destination. Another much simple to use tool is FileMonkey. This gives you many more options to create certain task with a series of files.

Similar Threads

  1. Winrar command line path extraction
    By Catchkuber in forum Windows Software
    Replies: 8
    Last Post: 27-09-2011, 10:37 PM
  2. Replies: 1
    Last Post: 24-08-2011, 12:35 PM
  3. How to unzip multiple files at once in Linux?
    By Waffle in forum Operating Systems
    Replies: 4
    Last Post: 30-12-2009, 05:10 AM
  4. Winrar: Create SFX via Command Line
    By magicT in forum Windows Software
    Replies: 3
    Last Post: 03-07-2009, 01:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,205,526.55343 seconds with 17 queries