How to run windows 7 scandisk from the command line. Checking and fixing disk errors using the Windows Chkdsk utility

Short for "check disk" CHKDSK command is a Prompt command, used to check the specified disk and repair or restore data on the disk, if necessary.

Chkdsk also marks any bad or bad sectors on the hard drive or drive as "bad" and recovers any information not yet corrupted.

Chkdsk Command Availability

CHKDSK command is available from command line in Windows 10, Windows 8, Windows 7, Windows Vista and Windows XP operating systems.

The CHKDSK command is also available from the command line in Advanced Startup Options and System Restore Options. It also works from the Recovery Console in Windows 2000 and Windows XP. Chkdsk is also a DOS command available in most versions of MS-DOS.

Note... Availability of some team teams chkdsk and other chkdsk command syntax may differ from operating system to operating system.

Chkdsk command syntax

CHKDSK [volume [[path] filename]]]]

volumeDrive letter (followed by a colon), mount point, or volume name. (for example C :)
File nameFiles checked for presence
fragmentation (FAT / FAT32 only).
/ F This option of the chkdsk command will fix any errors found on the disk.
/ V For FAT / FAT32: displays the full path and name of each file
on disk. For NTFS: Displays cleanup messages (if any).
/ R Searches for damaged sectors and restores the surviving one
information (requires / F when not specified / scan).
/ X Pre-dismounts the volume (if necessary).
All open handles for this volume will be invalidated (requires / F).
/ I NTFS only: Performs less stringent checks on index entries.
/ C NTFS only: Skips checking for loops inside the folder structure.
/ B NTFS only: Re-evaluates bad clusters on the volume (requires / R).
/ L:the size Use this chkdsk command to resize (in KB) the log file. The default log file size for chkdsk is 65536 KB; you can check the current size of the log file by doing / L without the "size" option.
/ perf This option allows chkdsk to run faster using more system resources. It should be used with / scan.
/ scan This chkdsk option starts an online scan on the NTFS volume, but does not attempt to repair it. Here, "online" means that the volume does not need to be unmounted, but instead it can remain online / active. This is true for internal and external hard drives; you can keep using them throughout the entire scan.
/ spotfix This chkdsk setting just unmounts this volume to fix the problems sent to the log file.
/ sdcleanup NTFS only: collects unnecessary descriptor data
safety as trash (requires / F).
/ offlinescanandfix Starts an offline check and repair of the volume.
/ freeorphanedchains For FAT / FAT32 / exFAT only: frees orphaned cluster chains
instead of restoring their contents.
/ markclean FAT / FAT32 / exFAT only: Marks the volume as blank if no corruption was found even if the / F option was not specified.
/? Use the help switch with the chkdsk command to display detailed help on the commands listed above and other options that you can use with chkdsk.

Note: The / I or / C option will shorten the execution time of Chkdsk by skipping some volume checks.

Note: there are other less commonly used chkdsk command switches such as / B to reevaluate bad clusters on a volume, / forceofflinefix, which starts an online scan (scan with an active volume), but then makes the repair work offline (after the volume has been unmounted), / offlinescanandfix, which runs an offline chkdsk scan and then fixes any problems it finds and others you can read more about via /? switch.

Note. Parameter / offlinescanandfix is ​​the same as parameter / F, except that it is only allowed on NTFS volumes.

If you use chkdsk command from Recovery Console in older Windows versions, use / p instead of / F above to instruct chkdsk to perform an extensive disk scan and fix any errors.

Chkdsk Command Examples

In the above example, since no disks or additional options were entered, chkdsk simply runs in read-only mode.

Note. If you encounter problems while running this simple chkdsk command, you should make sure to use the example below to fix any problems.

chkdsk c: / r

This example uses the chkdsk command to perform an extensive disk check C: to fix any errors and find any recovery information from bad sectors. This is best used when you run chkdsk from outside of Windows, for example from a recovery drive, where you need to specify which drive to scan.

chkdsk c: / scan / forceofflinefix

This chkdsk command runs online scan on volume C: so you don't have to unmount the volume to run the test, but instead of fixing any issues while the volume is running, the issues are sent to a queue to be resolved in offline.

chkdsk c: / r / scan / perf

In this example chkdsk will fix disk issues C :, when you use it, and will use as many system resources as allowed to keep it running as fast as possible.

Chkdsk related commands

Chkdsk is often used with many command line and Recovery Console commands.

The chkdsk command is similar to the scandisk command used to check the hard drive or floppy disk for errors in Windows 98 and MS-DOS.

A hard disk is one of the most important elements in a PC and its timely check helps to eliminate many troubles, for example, the loss of all the information available on it and the work done. Do not wait for the consequences of disk malfunctions in the form of braking and impossibility Windows startup 7.

It is better to periodically resort to preventive measures and, if possible, correct the resulting disk errors. For these purposes, the "chkdsk" application built into the "Seven" serves.

What is this program?

Users who are familiar with English language, already by the name of the utility, they can guess that the developers simply assigned a name to it by cutting the words (eliminating the vowels) “check disk”, that is, “check disk”.

The application is a built-in utility Windows tool 7, designed to detect file system errors and, if necessary, fix system failures.

Incorrect shutdown of the PC, misuse programs for disk optimization, infection with malicious applications, etc. sometimes lead to the automatic start of the disk check utility.

But often the application does not manifest itself in any way, even in the presence of serious problems. All actions of the program are recorded in a special journal. Windows users 7 can find it along the following path:

If some files do not start, the OS starts to slow down and often freezes, or Windows 7 cannot boot at all, then it is recommended to first run a disk check using "chkdsk".

Startup procedure using the graphical interface

You need to do the following:


Starting procedure using the command line

There is a faster method to launch the program. To do this, you will need to perform the following actions:

Note: In the command entered in the KS, the symbol "c" must correspond to the letter of the disk being analyzed. Specifying the "/ f" parameter in the request will provide automatic elimination of detected system failures after diagnostics.

  • When you finish typing the command, you should click "Enter";
  • In cases where the user has performed the above actions for a logical volume that is not a system one, the analysis will start immediately after clicking on "Enter". In this case, the report on the performed diagnostics will be presented directly in the CS window. If an OS is installed on the diagnosed volume, a menu will be displayed warning the owner of the PC about performing the check during the next OS reboot.

When the user needs to test quickly, the "/ i" parameter can be entered. The analysis will take much less time, however, the diagnosis is not performed as thoroughly.

If you need to detect bad sectors and perform recovery, it is recommended to enter the "/ r" parameter.

Startup procedure using bootable media with Windows 7

The following steps must be taken:

  • First, you need to set the boot priority of the system in BIOS with bootable media;

Note: Instructions for entering the BIOS are in the accompanying documentation for the computer. The process may vary slightly for each PC model. In the "Boot" tab, the priority of starting the system from the media is manually set.

On Microsoft DOS and Windows operating systems chkdsk utility is used to fix errors that have occurred on the hard disk. Its name speaks for itself - the abbreviation is derived from the abbreviation of two words "check disk". The program can fix errors in the file system, and, starting with Windows NT, it can also find damaged sectors of the hard drive. If found, they will be specially marked as damaged, and their further use will be terminated. This can help if you have a frequent blue screen of death.

Read more here - blue screen of death what to do.

Console Commands

If you run the utility chkdsk by default, a standard error check will be performed on all logical volumes on the hard drive. As a result, you will receive a report on the errors found or their absence, without any further action. Console commands are used for more fine tuning. - Volume... In the event that you need to check one specific volume, you should indicate the designation in Latin letters. - / F. When this parameter is set, the errors found will be corrected whenever possible. - / R... Program chkdsk will search for bad sectors, try to fix them, or mark them as inaccessible. This parameter works only in conjunction with / F. These are the three main commands of the console. They are quite enough for diagnostics and fixing errors on the hard disk. Other parameters are used much less frequently.

Launching CHKDSK

To begin with, it should be noted that if the PC is turned off incorrectly, the next boot will automatically initiate the process of checking the disk for errors. Let's take a look at manually launching the program chkdsk. Method 1... Use the launch console Windows programs 7 - press to start it Win + R... Dial the service command chkdsk with all the required parameters, and to run it, click OK... The same can be done in the console, having previously launched it by typing in the program launch window cmd.exe. Method 2... We will now use the properties of the local volume. Open "My Computer", right-click on the one that we want to check. Select "Properties" and go to the "Service" tab.

Now we should select the item "Perform check".

We celebrate desired parameters, and click "Start". The disk check starts. If verification is not possible while the operating system is running, the utility chkdsk suggest that you schedule the scan to start the next time you turn on your computer. In any case, you need to know how to run the chkdsk utility. It is useful for different tasks.

Checking the hard drive for errors necessary in case slow work or freezing of the computer, as well as failure of the operating system. Often, many users try to resort to third-party software, which is inconvenient for simply checking the hard drive for errors. Therefore, we will consider in this article “ how to check HDD for mistakes»Using two methods integrated into the Windows operating system.

There are two ways to run a disk check:

  • launching the chkdsk utility using the command line (be sure to run with administrator rights);
  • check disk with standard tools in graphic Windows interface, or rather through the "properties of the disk."

Checking the hard disk for errors using the command line (method I)

To run the built-in utility CHKDSK you must run the command line console with administrator rights. To open it, use the "Win + R" key combination, in the "Run" window, enter the "cmd" value in an empty field and run it. For more information see: Windows Command Prompt.

As shown in the picture, we entered one command with additional parameters which will check the hard disk for errors - CHKDSK C: / F / R, where:

Chkdsk- the name of the utility for checking the hard disk is indicated;

C:- this parameter means that we will check the C partition (system disk);

/ F- this parameter will fix errors on the disk.

/ R- search for bad sectors and recovery of the surviving information.

After entering the command, a message will appear that the disk will be checked for errors the next time the system is rebooted. Agree, enter "Y" from the keyboard and restart the computer to start the test.

Additional information on utility parameters сhkdsk can be obtained by running it with key "/?".

Checking the hard disk for errors with graphical interface(II method)

Regardless of the operating systems used - Windows XP, Windows 7 or Windows 8, you need to go to the icon on the desktop "My Computer" - "This Computer" - "Computer".

Next, select desired disk, right-click and select "Properties". To check the hard drive, go to the "Service" tab. In the window that opens, click the "Check" button. When you click on the button, a special window will appear, move the cursor and click "Check Disk".

After clicking, a scan window will appear, which notifies you about the analysis of the hard disk check for errors. The disk check process may take some time.

If successful, the above image will appear.

And if there are indeed errors on the scanned disk, the program will offer to restore this disk. Therefore, you need to click on the "Recover disk" button and if operating system will not be able to fix errors, usually this is found on system disk C, then the error checking program will offer "Repair disk on next reboot", click this button, the program will close and you will need to restart the computer.

After rebooting, during the start of your computer, it will open special application, which will check and fix errors on the tested hard disk. Here are two easy ways that can be used to check any local disk for mistakes.

The next lesson will help you to stop chkdsk from always running when Windows 10/8/7 is booted. Checking the disk will be very helpful though, as it periodically checks for system errors and crashes. But, when you turn on your computer, you get by default 8 extra seconds for the disk check to pass. Check Disk Utility or Chkdsk.exe in Windows 10/8/7 is used to check for disk and file system errors.

In such cases, you can cancel the scheduled DskChk at boot. To cancel a disk check, you need to first determine if any disk has all scheduled checks. Once you determine, you can simply press any key to skip the disk check for the next reboot session.

If you face different problems ranging from blue screen and the inability to open, save files or folders, you must run the chkdsk.exe program. In case of an abrupt stop of the OS or if it finds problems with file system then check disk start working and automatically. There may also be times when you may find that this disk check utility starts automatically every time Windows starts. You can schedule it to run once yourself, or your Windows may decide to schedule it to run itself. But instead of only working once, it keeps working every time the computer is turned on when Windows boots.

Automatic disk check runs on every startup

If the disk check or chkdsk, a tool built into Windows, runs on every boot, here are a few things you can try.

1. First of all, let it run completely once.

2. Now, you need to open the registry editor and go to the following registry key:

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager

V right panel You will see the bootexecute parameter. Here you need to change its value from autocheck autochk * /. on autocheck autochk *

3. Open a command prompt in Windows and type the following command and press Enter:

fsutil dirty query g:

This command will ask for the disk, and more than likely it will tell you that it is dirty.

Next, enter the CHKNTFS / X G: command to not check a specific drive (G) on the next reboot. Next, manually restart the computer, it should not run the chkdsk program, and will take you directly to the Windows desktop.

Once Windows is fully loaded, enter another command Chkdsk / f / r g: into the command line. This command should go through five stages of scanning and determine which bit is dirty. Finally, type fsutil dirty query g: and press Enter. Windows will confirm that this disk is clean.

You can run chkdsk / r or chkdsk / f commands from the command line to check hard disk for errors. However, if you entered chkdsk / r and chkdsk / f, they can take a very long time to complete on a Windows 10.8.7 computer.

Hope this solution helps you!