Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 28 Set 2018
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 Commento
Deep
Deep il 1 Ott 2018
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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Software Development Tools in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by