Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
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

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 28 Sep 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 commentaire
Deep
Deep le 1 Oct 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Software Development Tools dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by