필터 지우기
필터 지우기

How can I copy a set of files from an a drive with Read-only access to a local drive?

조회 수: 4 (최근 30일)
I tried to use copyfile and movefile commands to test if I could copy 1 file from the folder in a drive that I have a read-only access to a local drive. However it gave me an error "Access is denied." It is not possible to obtain a read-write permission. I can manually copy the file, however it is not a good option since I have 100s of such files in other subfolders which I need to move as well. I would appreciate any suggestions on how to proceed with this problem

채택된 답변

Fangjun Jiang
Fangjun Jiang 2018년 9월 28일
Double check again. You should have no problem copying files from a read-only source location. The file might also be read-only once it is copied to the destination. I got "Access is Denied" message when running the copyfile() the second time (because the read-only file at the destination can't be over-written), but I can run copyfile(SrcFile,DstFile,'f')
  댓글 수: 1
Deep
Deep 2018년 10월 1일
Thank you very much. It worked. The mistake that I was making was trying to copy the file to the "read-only" drive instead of setting the destination as local drive.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by