"File might be corrupt" error even files are not corrupt
34 次查看(过去 30 天)
显示 更早的评论
Hi All,
I have a couple of files with the 'File might be corrupt." error message when they are loaded.
They are not corrupt because they can be loaded if the file location is changed (see below).
The version of MATLAB is 9.8.0.1417392 (R2020a) Update 4
The enviromnet is a bit complicated.
MATLAB is running on the Windows10 virtual desktop.
I am accessing with VMWare Horizon Client from the Windows10 PC.
A local folder of my PC is shared with the virtual desktop.
That folder is used for OneDrive (but the files exist on the local drive).
These "corrupt" files are created under this share folder.
The file size is ~50 KB.
However, once they are created, they are not able to be loaded.
Once the files are moved to the Desktop of the virtual Windows10,
they can be loaded.
This issue may be due to this complicated environment rather than MATLAB itself,
but if someone knows how to fix it, please let me know.
Thank you in advance for your help.
Regards,
Kosuke
Added on 12/4/2020
Thank you for the comments from the community members.
It is nice to have such a wonderful community to help each other.
Let me add a couple of things.
1. Even there is a file with the 'File might be corrupt." error in the shared folder (that is shared between Virtual Desktop and local PC, and also local PC and OneDrive), other files in that folder can be loaded without problems.
2. If the same variables included in the original file are saved as same or different name, the error message persists.
3. Currently, the files showing this error message are related to xlsread, i.e, [num, txt, raw] = xlsread(filename), then the three variables are saved in a MAT file directly or they are comined in a structure and saved.
4 个评论
Walter Roberson
2020-12-3
MATLAB especially does not always play nice with OneDrive. There have been problems in the past with setting up local caching in OneDrive -- something that improves performance a fair bit, but there was some kind of timing glitch .
It is not uncommon for there to be difficulties related to time synchronization between systems with network drives. These kinds of problems affect nearly all network drive systems (except Kerobos, which has a built-in time synchronization), but the posts I see about these kinds of time problems feedback loops seem to all come from Windows systems these days (which could be because there are a lot more Windows systems.)
回答(1 个)
Kandarp Khandwala
2020-12-4
Hi Kosuke, you could try marking the file(s) or folder for offline use as follows, which might avoid the issue:
- Right-click a file or folder.
- Select Always keep on this device.
To read more about this in the OneDrive documentation, go to https://support.microsoft.com/en-us/office/save-disk-space-with-onedrive-files-on-demand-for-windows-10-0e6860d3-d9f3-4971-b321-7092438fb38e
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!