cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lala
Level VIII

Can JSL extract "abc.7z" compressed files to the specified folder?

Hello!


For example,

if the compressed package file is "C:\1\abc.7z",

its default compression Program is "C:\Program Files\WinRAR\ winrar.exe ".


With JSL this unzips the file to "C:\2".

1 ACCEPTED SOLUTION

Accepted Solutions
Jasean
Staff

Re: Can JSL extract "abc.7z" compressed files to the specified folder?

I downloaded the free version of rar.exe.  In the User's Manual (Rar.txt) available in the install folder, the second paragraph of the Introduction indicates that "RAR supports only RAR format archives, which have .rar file name extension by default.  ZIP and other formats are not supported."

 

Sure enough, I cannot decompress a 7z archive with rar.exe - even from the command window (independent of JMP).

 

However, WinRAR supports command line mode, and sure enough, it will decompress a file from the Command window.  Here is how to do it with JSL from within JMP.

 

RP = Run Program(
	Executable( "C:\Program Files\WinRAR\WinRAR.exe" ),
	Options( {"e -or C:\1\abc.7z C:\2"} )
);

View solution in original post

3 REPLIES 3
Jasean
Staff

Re: Can JSL extract "abc.7z" compressed files to the specified folder?

Hi lala,

 

I am not sure how you are currently uncompressing the archive with JSL, but JSL has a function called Run Program() that allows you execute a program, send options to specify how the program should be executed.  Furthermore, it looks like WinRAR has a command line executable with optional switches to compress or uncompress an archive in a variety of ways.  If you can determine how to use UnRAR.exe to uncompress your files as desired, it should be a simple task to execute that command from within JSL.

I hope this is helpful.  If you need help executing a command in JSL, please post the command (that you would execute in a cmd.exe window) that will uncompress your archive the way you want.

lala
Level VIII

Re: Can JSL extract "abc.7z" compressed files to the specified folder?

"C:\Program Files\WinRAR\rar.exe" e -or "C:\1\abc.7z" "C:\2"
Jasean
Staff

Re: Can JSL extract "abc.7z" compressed files to the specified folder?

I downloaded the free version of rar.exe.  In the User's Manual (Rar.txt) available in the install folder, the second paragraph of the Introduction indicates that "RAR supports only RAR format archives, which have .rar file name extension by default.  ZIP and other formats are not supported."

 

Sure enough, I cannot decompress a 7z archive with rar.exe - even from the command window (independent of JMP).

 

However, WinRAR supports command line mode, and sure enough, it will decompress a file from the Command window.  Here is how to do it with JSL from within JMP.

 

RP = Run Program(
	Executable( "C:\Program Files\WinRAR\WinRAR.exe" ),
	Options( {"e -or C:\1\abc.7z C:\2"} )
);