How to create a password protected zip file using matlab?

14 次查看(过去 30 天)
Query is on : create a password protected zip file using matlab
I already used as below:
7z a archive.7z -psecret *.mat
But I am getting error: Error: Unexpected MATLAB expression. (Used Matlab R2017b)
  2 个评论
Partha Mitra
Partha Mitra 2020-6-6
Sorry I modified my earlier comment:
7z a archive.7z -psecret *.mat
I was getting error.
Error: Unexpected MATLAB expression. (Used Matlab R2017b)
What do I have to do to encrypt *.mat file

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2020-6-6
! 7z a archive.7z -psecret *.mat
or
system('7z a archive.7z -psecret *.mat')
  4 个评论
Partha Mitra
Partha Mitra 2020-6-7
It worked, with following way:
system('"C:\Program Files\7-Zip\7z.exe" a arc.7z -psecret *.mat')
Walter Roberson
Walter Roberson 2020-6-7
Using an exact path like you did is often a good idea for reliability... on any one system... but unfortunately not always portable.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by