"File might be corrupt" error even files are not corrupt
29 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 3 Déc 2020
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.)
Réponses (1)
Kandarp Khandwala
le 4 Déc 2020
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
Voir également
Catégories
En savoir plus sur File Operations 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!