EXTRACTION

Other discussions about CSPro
Post Reply
YFT_CBSD
Posts: 48
Joined: January 3rd, 2023, 12:36 am

EXTRACTION

Post by YFT_CBSD »

Hi can u pls add my code to do the ff:
1.extract the sample data.zip
2. make the input data based from the extracted sample data.zip

Here:
SystemApp winrar;
winrar.setArgument(pathconcat("../Sample data.zip"));
winrar.exec("WinRAR.exe");

Thanks
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: EXTRACTION

Post by Gregory Martin »

Unless your .zip file is encrypted, you can do this without WinRAR by using the built-in function decompress: https://www.csprousers.org/help/CSPro/d ... ction.html
YFT_CBSD
Posts: 48
Joined: January 3rd, 2023, 12:36 am

Re: EXTRACTION

Post by YFT_CBSD »

Unfortunately, the .zip file is encrypted. Is there a way to hardcode the password for decompression?

Thanks again.
savy
Posts: 163
Joined: December 27th, 2012, 1:36 pm

Re: EXTRACTION

Post by savy »

You could try the system app approach giving the correct command line arguents for WinRAR. While I have not tested this, something like this could work.

Code: Select all

WinRAR x -pMyPassword "C:\Path\To\Encrypted.zip" "C:\Destination\Directory"
Please check WinRAR documentation for the commandline syntax.
Post Reply