Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
punitpopli
Specialist
Specialist

Help on Batch script command

Hi Experts,

I am working on one of the batch script and require help on the same.

Not sure if this is the right place to post a question on batch scripting

Scenario :  A 7z file having multiple folders and each subfolder contain 1 or more files

Unzip.7z

          Folder1

                     A.qvw

          Folder2

                     B.qvw

          Folder3

                     C.qvw

Task to achieve : unzip the 7z file and extract all the sub folders i.e. Folder 1, Folder 2, Folder 3 at some destination location

I have use below command but this command is extracting all sub folders and their files seperately i.e. like below

command  : "C:\Windows\7za.exe" e  "C:\Unzip.7z" -o"C:\Test\"

Output :

    Folder 1

    Folder 2

    Folder 3

    A.qvw

    B.qvw

    C.qvw

I think i am missing a switch which will help me to achieve the required output.

Can anyone help me here?

Thanks in advance

-Punit

1 Solution

Accepted Solutions
rahulpawarb
Specialist III
Specialist III

Hello Punit,

You can refer the below sample code:

//Using 7zip

"C:\Windows\7za.exe" x "C:\Unzip.7z" -o "C:\Test\"


//Using WinRAR

"C:\Program Files\WinRAR\WinRAR.exe" x "C:\Data.zip" -o "C:\Test\"


Hope this will help.


Regards!

Rahul

View solution in original post

4 Replies
vinieme12
Champion III
Champion III

This isn't related to QV , so i suggest you ask this on forums like StackOverflow

windows - How to use a simple batch file to unzip & overwrite existing file - Stack Overflow

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
rahulpawarb
Specialist III
Specialist III

Hello Punit,

You can refer the below sample code:

//Using 7zip

"C:\Windows\7za.exe" x "C:\Unzip.7z" -o "C:\Test\"


//Using WinRAR

"C:\Program Files\WinRAR\WinRAR.exe" x "C:\Data.zip" -o "C:\Test\"


Hope this will help.


Regards!

Rahul

punitpopli
Specialist
Specialist
Author

Thank Rahul for all your help!!

You made my day..

rahulpawarb
Specialist III
Specialist III

We are brothers Man!

Cheers,

Rahul