Azzera filtri
Azzera filtri

How to create a password protected zip file using matlab?

14 visualizzazioni (ultimi 30 giorni)
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 Commenti
David Hill
David Hill il 6 Giu 2020
Recommend encrypting file before zipping.
Partha Mitra
Partha Mitra il 6 Giu 2020
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

Accedi per commentare.

Risposte (1)

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

Accedi per commentare.

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by