Page 1 of 1

EXTRACTION

Posted: March 6th, 2024, 6:33 am
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

Re: EXTRACTION

Posted: March 6th, 2024, 1:23 pm
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

Re: EXTRACTION

Posted: March 6th, 2024, 9:14 pm
by YFT_CBSD
Unfortunately, the .zip file is encrypted. Is there a way to hardcode the password for decompression?

Thanks again.

Re: EXTRACTION

Posted: March 8th, 2024, 12:55 pm
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.