필터 지우기
필터 지우기

*.7zip Decompression

조회 수: 61 (최근 30일)
sri prakash muniyandi
sri prakash muniyandi 2016년 2월 17일
댓글: Walter Roberson 2021년 7월 27일
am able to decompress the *.7zip file using
[status,result] = system(['"C:\Program Files\7za920\7za.exe" -y x ' ...
'"' filename{f} '"' ' -o' '"' outputDir '"']);
but at the time of extraction the 7zip application window is appearing on my window. i just want to suppress that window. can any one help

답변 (4개)

Image Analyst
Image Analyst 2016년 2월 17일
If it listens to ActiveX you could launch it first, then minimize it, then do your unzipping command. Do you know how to program in ActiveX?
  댓글 수: 1
sri prakash muniyandi
sri prakash muniyandi 2016년 2월 19일
HI i tried with actxserver but am not able to find a Progid for 7zip software. i used actxcontrollist command to list the control in my system. If you know in detail can u share ur knowledge. tnk u....,

댓글을 달려면 로그인하십시오.


Jan
Jan 2016년 2월 19일
  댓글 수: 1
sri prakash muniyandi
sri prakash muniyandi 2016년 2월 19일
hi i have a problem of decompressing a 7zip data in hide mode.
i tried system command as bellow
[statuse,~] = system(['"' 7zip software path '" -y x ' '"' path of file need to extract '"' ' -o' '"' path of destination folder '"'])
it works but this will pops up the 7zip software application window on my screen. actually i don't want that too happen so i tried a another way
try 2:
i wrote a batch file looks like as below then i called that through matlab system function
cd "7zip software path" start/min 7zG -y x "path which contain my compressed file" -o"Output folder to store a extraction"
In this method am able to do extraction in minimized mode(not in hide mode) but before extraction finish matlab continuous its next statement to execute. actually i want to read one file which is present in the extraction but am not able to read that file because the matlab continuous it's execution before the extraction complete.
So at end i want to decompress some *.7z folder from matlab in a hide mode.can plz help on this....,

댓글을 달려면 로그인하십시오.


sri prakash muniyandi
sri prakash muniyandi 2016년 2월 23일
Hi all,
7zip file manager software given two exe versions as 7z.exe and 7zG.exe. 7zG.exe is the one for gui application and 7z.exe is the one for command line operation.so when you use 7z.exe the extraction will happen in hidden mode.

Nikolay Ampilogov
Nikolay Ampilogov 2021년 7월 27일
Yes, call the Matlab function system() combining the commands via && in following way:
1) to make an archive in a certain folder:
[status,cmdout] = system('C: && cd C:\Program Files\7-Zip && 7z.exe a -t7z -mx8 d:\test\archive.7z d:\test\archive.txt');
where: status - returned code of execution status; cmdout - returned message from the command line (useful to execution control & debug); C: - set C: as current disk; cd C:\Program Files\7-Zip - set the 7Zip installation folder as current; 7z.exe - call 7Zip with parameters: a - make the archive; -t7z - set type of the archive as 7Zip; -mx8 - set the compression level as Maximum; d:\test\archive.7z - file name of the future archive; d:\test\archive.txt - name of the file to be archived;
2) to extract an archive to a certain folder:
[status,cmdout] = system('C: && cd C:\Program Files\7-Zip && 7z.exe x d:\test\archive.7z -od:\test\');
where: status - returned code of execution status; cmdout - returned message from the command line (useful to execution control & debug); C: - set C: as current disk; cd C:\Program Files\7-Zip - set the 7Zip installation folder as current; 7z.exe - call 7Zip with parameters: x - extract the archive from the certain folder; d:\test\archive.7z - file name of the archive; -od:\test\ - extract to folder d:\test\ .
https://stackoverflow.com/questions/39604454/can-matlab-send-detailed-orders-to-7-zip
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 7월 27일
[status,cmdout] = system('"C:\Program Files\7-Zip\7z.exe" a -t7z -mx8 d:\test\archive.7z d:\test\archive.txt');
should eliminate the need to change default disk (which could lead to other problems)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by