Problems reading select files from external hard drive.

I am having problems when reading specific files from an external hard drive. I essentially have a folder of text files that I am reading individually (all files have identical formatting etc.). For some reason, on certain files (in this situation ~200/300 files) MATLAB returns an error that the file is not there when I try to read it. What I have tried:
  • If I use exist(fileName,'file') it does not show up
  • When I use the dir() command to generate the list of files it is there
  • If I copy the entire directory to my computer's hard drive the script executes without trouble
I routinely read files in this manner from the hard drive and the problem has never occurred before. I have not been able to re-create this problem in any other similarly formatted script. Any thoughts?

댓글 수: 4

Odd. If it were a Network drive that would be more common.

Does your external drive support SMART? http://www.howtogeek.com/134735/how-to-see-if-your-hard-drive-is-dying/

SMART shows disk is healthy. Since I had copied it to my computer's hard drive and it worked, I tried copying the locally stored version back to my external in a different location. Still having the same problem. The files that it can't read are the same as well.
Permissions problem?? Does it affect entire subdirectories? Do the files have unusual ACL or security permissions?
Think I got it fixed (at least for now). Tried reading them from my external on another computer, and it was fine. Reinstalled all the drivers on my computer and the problem appears to have gone away. Not quite sure what made it not recognize those particular files, but happy it is working now.
Thanks for your time.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

질문:

2016년 1월 27일

댓글:

2016년 1월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by