Files showing as corrupted OneDrive

David Kolln 0 Reputation points
2026-08-15T14:24:48.58+00:00

I have had OneDrive work account for around 7 years or so. Some files on this drive have been on there for at least that long. Yesterday while browsing through some files I noticed that they have an accurate space count 4kb, etc. however when you go to open them, they only show NULLNULLNULL.....

It seems to have affected all files with extensions of .txt and .sql

If you go to version history - it says there is no version history. I'm at a complete loss. Years and Years of notes, scripts, and work has essentially been lost. What can I do?

Microsoft 365 and Office | OneDrive | For home | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-08-15T14:25:02.8933333+00:00

    For a work or school OneDrive account, the supported recovery path is:

    1. Check the OneDrive website first.
      • Sign in to OneDrive on the web.
      • Use Search everything to look for the affected .txt and .sql files.
      • Open the affected folder and confirm whether the files are also bad there, not just in File Explorer.
    2. Check the Recycle bin.
      • In the left pane of the OneDrive website, select Recycle bin.
      • If older or duplicate copies of the files are there, select them and choose Restore.
    3. Check for a local copy on the synced computer.
      • If the OneDrive sync client has been used, check whether a working copy of the file or folder still exists on the local computer.
      • This is specifically recommended when files are missing, deleted, or corrupted.
    4. Try restoring the entire OneDrive to an earlier time if many files are affected.
      • Microsoft’s documented option for many deleted, overwritten, corrupted, or malware-affected files is to restore the entire OneDrive to a previous time.
      • This is the main supported recovery option when multiple files are affected and individual version history is unavailable or not useful.
    5. If only a few files still show version history anywhere, restore an earlier version.
      • In Microsoft 365, browse to the library containing the file.
      • Select the ellipses (...) next to the file, then Version History.
      • Select an earlier version date, choose Restore, then OK.
      • If version history says there is none, this path is not available for those files.
    6. If the above does not recover the data, contact Microsoft 365 support immediately.
      • Provide:
        • the full URL for the affected site collection or library
        • the names of several affected files, including extensions
        • the date and time when the files were last known to be healthy

    Important limit:

    • SharePoint Online retains backups of content for 14 additional days beyond actual deletion. If content cannot be restored through Recycle Bin or Files Restore, an administrator can contact Microsoft Support to request a restore within that 14-day window.
    • Backup-based restorations can be completed only for site collections, not for individual files, items, lists, libraries, or sub-sites.

    Since the corruption appears to affect many files and Version History shows no version history, the best supported path is to check for a good local copy, then use Restore your OneDrive, and if that fails, escalate to Microsoft 365 support as quickly as possible.


    References

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.