Why did chkdsk delete all the files and how can I recover them?

Abstract: Recover files moved to $BadClus or marked as free space by CHKDSK using specialized software like TestDisk or PhotoRec.

Created: 2026-08-22 by

CHKDSK does not intentionally delete user files; it removes only corrupted data or moves them to a hidden $BadClus folder when the file system structure is damaged. To recover these files, you must first stop writing new data to the drive, then use specialized recovery software like TestDisk or PhotoRec to scan for and restore the lost information from the raw disk sectors.

Understanding Why CHKDSK Appears to Delete Files

When users run the Check Disk utility in Windows, they often panic after seeing that large amounts of data have vanished. It is crucial to understand that CHKDSK is a diagnostic and repair tool, not a formatting utility. Its primary job is to fix inconsistencies between the file system metadata (the Master File Table or MFT) and the actual physical location of data on the disk. When CHKDSK encounters a situation where a file is marked as existing but its clusters are fragmented, missing, or corrupted, it cannot leave the file in a broken state because the operating system might try to read it and cause further errors.

In these scenarios, CHKDSK performs two specific actions depending on the severity of the corruption. First, it may move the orphaned clusters into a special hidden directory called $BadClus. The files inside this folder usually have generic names like File0001.chk and contain the raw binary data that was previously part of your document or image. Second, if the corruption is so severe that the file's header is unreadable or the chain of clusters is completely broken, CHKDSK may simply mark those clusters as free space to prevent future write operations from overwriting potentially salvageable data elsewhere. This second action effectively makes the file "deleted" from the perspective of the file system, though the data bits may still exist on the platter or NAND flash until overwritten.

Distinguishing Between Corruption and Malware

Sometimes, what appears to be CHKDSK deleting files is actually ransomware or aggressive antivirus software quarantining infected files. However, if you recently ran a disk check following a system crash, power failure, or improper shutdown, the loss is almost certainly due to file system repair logic. You can verify this by checking the Event Viewer under Windows Logs > System for entries related to Chkdsk or ntfs that mention repairing errors. If you see such logs, the data is likely in the $BadClus folder or still residing in unallocated space.

Immediate Steps to Prevent Further Data Loss

The most critical rule in data recovery is to stop using the affected drive immediately. Every time you save a new file, install an application, or even browse the web with that drive mounted, the operating system may write new data to the sectors where your old files reside. This process, known as overwriting, permanently destroys the possibility of recovery for those specific sectors. If the drive in question is your main system drive, shut down the computer and remove the drive, connecting it to another healthy computer as a secondary or external drive. This ensures that no background processes, such as indexing or antivirus scanning, attempt to access or modify the data.

If you are dealing with a logical error on a separate partition, do not run CHKDSK again. Re-running the utility on an already partially repaired volume can sometimes complicate the recovery process by moving more data around or altering the cluster chains in ways that make forensic reconstruction difficult. Instead, proceed directly to recovery tools designed to read raw data without modifying the file system structure.

Recovering Files Using TestDisk and PhotoRec

TestDisk is a powerful open-source tool that excels at recovering deleted partitions and fixing boot sectors, but its companion tool, PhotoRec, is specifically designed for file carving. File carving ignores the file system entirely and looks for known file signatures (headers) in the raw data stream. This method is highly effective for recovering documents, images, and videos even when the file system is severely damaged.

# Install TestDisk on Linux-based systems
sudo apt-get install testdisk

# Launch the suite
testdisk_win.exe # On Windows
testdisk        # On Linux/Mac

Once you launch PhotoRec, select the affected drive and choose the partition type (typically NTFS for Windows drives). You will be asked to specify a destination directory for the recovered files. Always choose a location on a different physical drive than the one you are recovering from. PhotoRec will create a new directory structure named recup_dir containing subdirectories like recup_dir.1, recup_dir.2, etc. Inside these folders, you will find thousands of files with generic extensions like .jpg, .doc, or .pdf. Since the original filenames are often lost during the carving process, you will need to manually sort through these files to identify the important ones.

Alternative Recovery Methods

If PhotoRec fails to locate your files, you may need to examine the $BadClus folder directly. Open Command Prompt as Administrator and navigate to the root of the affected drive. Use the command dir /a $BadClus to list any hidden checkpoint files. These files can sometimes be renamed to their original extensions if you know the file type, allowing standard applications to open them. For more complex cases involving encrypted volumes, refer to our guide on Recovering Data from a BitLocker Encrypted Volume with Decryption Key to ensure you have the necessary keys before attempting low-level scans.

Preventing Future Data Loss During Disk Checks

To minimize the risk of data becoming orphaned during future disk checks, ensure your system has adequate power protection. Uninterruptible Power Supplies (UPS) can prevent sudden shutdowns that lead to file system corruption. Additionally, regular backups are the only true guarantee against data loss. While CHKDSK is essential for maintaining system health, it should never be considered a backup strategy. If you experience boot issues after running disk checks, consult our article on SSD Stopped Booting After CHKDSK to troubleshoot potential boot sector conflicts.

Frequently Asked Questions

Can I recover files if CHKDSK says there are no errors?

If CHKDSK reports no errors, the file system structure is intact, and the files were likely deleted by the user or removed by malware rather than the utility itself. In this case, you should skip the deep scan approach and instead use standard undelete recovery software that reads the MFT records to restore the original filenames and directory paths quickly.

Is it safe to run CHKDSK on an SSD?

Running CHKDSK on an SSD is generally safe and recommended to maintain file system integrity, as SSDs do not suffer from physical head crashes like HDDs. However, frequent full scans can contribute to wear on the drive's write cycles. Modern versions of Windows handle SSD optimization automatically, so manual CHKDSK runs are usually only necessary when you suspect logical corruption or after a system crash.

Why does PhotoRec rename all my recovered files?

PhotoRec works by "carving" data based on file headers and footers, ignoring the file system's directory table which stores original filenames. Because the filename metadata is stored separately from the actual file content, once the file system is corrupted or the file is deleted, the link between the name and the data is broken. PhotoRec recovers the data payload but cannot reconstruct the name unless it finds remnants of the filename in unused sectors.

What should I do if the drive is not recognized by recovery software?

If the drive does not appear in your operating system or recovery tools, the issue may be hardware-related rather than logical. Check the SATA or USB connections, try a different cable, or listen for unusual clicking sounds which indicate mechanical failure. If the drive spins up but remains invisible, you may need professional hardware-level intervention, as software tools cannot communicate with a drive that the motherboard cannot enumerate.

Can I recover files from a formatted drive using TestDisk?

Yes, TestDisk is particularly effective at recovering partitions that have been accidentally formatted or deleted. It can rebuild the partition table and restore the original file system structure, allowing you to access files exactly as they were before the format. However, if the format was a "quick format," the data is easily recoverable, whereas a "full format" writes zeros to the entire drive, making recovery impossible.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More