Unzipping a .tgz file
    조회 수: 13 (최근 30일)
  
       이전 댓글 표시
    
Hi all, I have encountered difficulty trying to use the untar function to extract a .tgz file that contains many text files within it. I get an error for every single text file saying
Warning: Permission denied to create file "C:<redacted for privacy>". 
> In extractArchive>extractArchiveEntry (line 109)
  In extractArchive (line 52)
  In untar (line 79) 
Here's what I've tried to troubleshoot the problem:
- I am able to use 7-zip to unzip the same .tgz succesfully, so I know it is not a problem with the file itself
 - When the same files are contained in a .tar.gz folder, MATLAB works, so I don't think it's a permissions issue with the directory (for reference, the directory is just a random folder on my Desktop, nothing fancy)
 - There are no existing files with that name that are being overwritten.
 
The untar documentation says that the function works for .tgz files, but that doesn't seem to be the case in my situation? Thanks in advance for any advice.
댓글 수: 6
  Walter Roberson
      
      
 2020년 12월 30일
				Colon character in the file name would potentially be a problem -- but notice that UserWrite is 0 so you do not have permission to write in the directory.
채택된 답변
추가 답변 (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!