*.7zip Decompression
61 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
sri prakash muniyandi
el 17 de Feb. de 2016
Comentada: Walter Roberson
el 27 de Jul. de 2021
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
0 comentarios
Respuestas (4)
Image Analyst
el 17 de Feb. de 2016
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?
Nikolay Ampilogov
el 27 de Jul. de 2021
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 comentario
Walter Roberson
el 27 de Jul. de 2021
[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)
Ver también
Categorías
Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!