Unable to unzip and untar a .tar.gz file
조회 수: 17 (최근 30일)
이전 댓글 표시
I have downloaded a .tar.gz file from the internet and I have written a code to unzip and untar the file. But there is an error keep popping up where it says the path to the file is not in a GZIP format, could anybody offer any other alternative as to how I would be able to untar and unzip the file.
myFile= "F:\podTc2_nrt_2022_001.tar.gz";
tarFile=gunzip(myFile);
untar(tarFile{1},"podtc2_data\");
the above is the code that was written, but i get an error using matlab.io.internal.archive.core.builtin.uncompressgz, where the file thats specified is not in a GZIP format.
Many Thanks
댓글 수: 2
Benjamin Thompson
2022년 7월 11일
Can you try this with some other compression tool such as Winzip or 7-zip?
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Compression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!