How to Fix 0 Bytes File: Recover Empty Files
In this article
When a file shows 0 bytes, it means the file system sees the file entry but no actual data is stored. This can happen after a crash, improper ejection, or a failed save. This guide shows you how to recover the data and prevent it from happening again. You'll need a computer with the affected drive, and possibly a backup or recovery tool.
What You'll Need
- The drive containing the 0-byte file (internal or external)
- A backup of the file (if you have one)
- A file recovery tool (optional, for deeper cases)
- Administrator access on Windows or macOS
Step-by-Step
- Check if the file is actually empty. Right-click the file and select Properties (Windows) or Get Info (Mac). Look at the size. If it says 0 bytes, the file system has lost the data pointer, but the data might still be on the disk.
- Try to open the file in its native application. Sometimes the file is not truly empty; the size might be misreported. Double-click it. If it opens, save a copy immediately to a different location.
- Check for a backup. Look in your backup drive, cloud storage (like Google Drive or OneDrive), or version history. If you have a recent backup, restore it. This is the safest and fastest fix.
- Run a disk check. On Windows, open Command Prompt as administrator and run
chkdsk X: /f(replace X with the drive letter). On Mac, use Disk Utility's First Aid. This can repair file system errors that cause 0-byte entries. - Use a file recovery tool. If the disk check doesn't help, download a reputable file recovery tool (like Recuva, TestDisk, or PhotoRec). Install it on a different drive, then scan the drive with the 0-byte file. These tools scan for raw data and can often recover the original content.
- Recover from the raw disk. If the recovery tool finds the file but it's still 0 bytes, try a deep scan. This reads the disk sector by sector. It may find the data even if the file table is corrupted. Save the recovered file to a different drive.
- Check for hidden or system files. Sometimes the file is there but hidden. In Windows, go to File Explorer Options and enable Show hidden files. On Mac, use Terminal command
defaults write com.apple.finder AppleShowAllFiles YESand restart Finder. - If all else fails, recreate the file. If the data is unrecoverable, you may need to recreate it from memory or from other sources. Accept the loss and move on.
Common Mistakes
- Writing to the same drive. After discovering a 0-byte file, do not save anything to that drive. New data can overwrite the old data, making recovery impossible.
- Ignoring the problem. If you keep using the drive, the file system may overwrite the lost data. Act quickly.
- Using unreliable recovery tools. Some free tools are malware or ineffective. Stick to well-known, reputable software.
- Not checking the recycle bin. If you deleted the file, it might be in the Recycle Bin (Windows) or Trash (Mac). Restore it from there.
Tips
- Back up regularly. The best fix is prevention. Use an external drive or cloud service to back up important files.
- Safely eject drives. Always use the "Safely Remove Hardware" option on Windows or drag the drive to the trash on Mac before unplugging.
- Keep your system updated. Updates often fix file system bugs that can cause data loss.
- Use a UPS for desktops. Power outages can corrupt files. A UPS gives you time to save and shut down properly.
Troubleshooting
What if the recovery tool doesn't find the file? Try a different tool or a deeper scan. Some tools are better at certain file types. You can also try a live Linux USB to access the drive without loading your main OS, which might bypass certain locks.
What if the disk check reports errors but can't fix them? The drive might be failing. Back up what you can immediately, and consider replacing the drive. You can try a more thorough check like chkdsk X: /r on Windows, but this can take hours.
What if the file is on a network drive? Check if the server has a backup or shadow copy. You may need to contact your IT department.
What if the file is on an SSD? SSDs use TRIM, which can permanently erase data quickly. Stop using the SSD immediately and use a recovery tool that supports SSDs, but success is less likely than with a hard drive.
Frequently Asked Questions
Can a 0-byte file be recovered?
Yes, often. The data may still exist on the disk even if the file table says 0 bytes. Recovery tools can scan for it.
Why did my file become 0 bytes?
Common causes include improper shutdown, power outage, virus, or software crash. The file system entry remains, but the data pointer is lost.
Is it safe to use the drive after a 0-byte file?
Stop using the drive immediately to avoid overwriting the lost data. Continue using it only after you've attempted recovery or accepted the loss.
What is the best free recovery tool?
Recuva is popular for Windows, and PhotoRec works on multiple platforms. They are free and effective, but results vary.
How long does a deep scan take?
It depends on the drive size and speed. A 1TB drive can take several hours. Be patient.
Can I prevent 0-byte files?
Yes, by backing up regularly, safely ejecting drives, and using a UPS for power outages. Also, keep your system healthy with disk checks.