Hi,
I have a folder which contains subfolders named c001 to c100. I need to compress each of them into zip file. So basically I need to run this function:
zip('c001','c001');
but making it automatically change to 002, 003 etc.
Thank you for your help!

 채택된 답변

Voss
Voss 2023년 8월 13일

1 개 추천

Here's one way:

for ii = 1:100
    str = sprintf('c%03d',ii);
    zip(str,str)
end

댓글 수: 2

Ewelina Lorenc
Ewelina Lorenc 2023년 8월 13일
Thank you, it works perfectly!
Voss
Voss 2023년 8월 13일
You're welcome!

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

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2023년 8월 13일

댓글:

2023년 8월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by