The USB flash drive is accidentally disconnected when transferring files, so that one file cannot be deleted anyway.
Unlocker reminds you to run chkdsk, so you can search for its usage. It can indeed repair damaged USB flash drives.
Chkdsk
Create and display the disk Status Report based on the file system used. Chkdsk also lists and corrects disk errors. If no parameter is specified, the chkdsk displays the disk status in the current drive.
Syntax
Chkdsk [volume:] [[path] filename] [/F] [/V] [/R] [/X] [/C] [/L [: Size]
Parameters
Volume:
Specify the drive letter (separated by a colon), mount point, or volume name.
[Path} filename]
Specify the location and name of the file or file set that requires chkdsk to check the fragment. Use wildcard characters (* And ?) You can specify multiple files.
/F
Fix disk errors. The disk must be locked. If the chkdsk cannot lock the drive, a message is displayed asking if you want to check the drive the next time you restart the computer.
/V
When checking the disk, the name of each file in all directories is displayed.
/R
Locate the bad sector and restore readable information. The disk must be locked.
/X
It is only used on NTFS. If necessary, force uninstall the volume first. All open handles of the drive are invalid. /X also includes the/F function.
/I
Only use with NTFS. Perform full checks on index items to reduce the time used to run chkdsk.
/C
Only use with NTFS. Skip the periodic check in the folder structure to reduce the time required to run chkdsk.
/L [: Size]
Only use with NTFS. Change the log file size to the size entered by the user. If this parameter is omitted,/L displays the size of the current log file.
/?
Display help at the command prompt.
Note
Run chkdsk
To run the chkdsk command on a fixed disk, you must be a member of the Administrators group.
Check the locked drive upon restart
If you want chkdsk to fix disk errors, you cannot open files on the drive before. If a file is opened, the following error message is displayed:
Chkdsk cannot run because the volume is in use by another processwocould you like to schedule this volume to be checked the next time the system restarts? (Y/N)
If you choose to check the drive the next time you restart the computer, after you restart the computer, chkdsk automatically checks the drive and fixes the error. If the drive partition is a boot partition, chkdsk automatically restarts the computer after checking the drive.
Report disk errors
The chkdsk command checks the usage of the disk space and File Allocation Table (FAT) and NTFS file system. The chkdsk provides information specific to each file system in the status report. The status report displays errors found in the file system. When running chkdsk on an active partition, if the/F command line option is not included, it may report false information because the drive cannot be locked. Chkdsk should be used occasionally to check errors on each disk.
Fix disk errors
The chkdsk command can fix disk errors only when the/F command line option is specified. The chkdsk must be able to lock the drive to correct the error. Because the repair usually changes the disk file allocation table and sometimes data is lost, chkdsk will first send the following confirmation message:
10 lost allocation units found in 3 chains.
Convert lost chains to files?
If you press y, Windows saves all lost links in a file named filennnn. Chk in the root directory. After the chkdsk is completed, you can check whether these files contain the required data. If you press N, Windows will repair the disk, but it does not save the contents of the lost allocation unit.
If you do not use the/F command line option, chkdsk sends a message when a file needs to be repaired, but it does not fix any errors.
If chkdsk/F is used on a large disk (for example, 70 GB) or a disk with a large number of files (millions), it may take a long time (for example, several days) to complete. Because the chkdsk will not surrender control until the work is completed, the computer will be unavailable during this period of time.
Check the fat Disk
The chkdsk Status Report of the fat disk is displayed in the following format in Windows:
Check NTFS Disk
In the following Windows format, the chkdsk Status Report of the NTFS disk is displayed:
Use chkdsk if the file is opened
If an opened file exists on the drive, chkdsk will send an error message after the/F command line option is specified. If the/F command line option is not specified and an open file exists, chkdsk reports the missing allocation unit on the disk. This may happen if the opened file is not recorded in the file allocation table. If chkdsk reports the loss of a large number of allocation units, you can consider restoring the disk.
An error occurred while searching for the physical disk.
Use the/R command line option to find physical disk errors in the file system. For more information about how to use recover to repair physically corrupt files, see "".
Reporting bad sector of a disk
When the disk is preparing for running for the first time, chkdsk reports that the bad sectors are marked as corrupted. They do not pose danger.
Exit code
The following table lists the exit codes reported by the chkdsk after the task is completed.
Exit Code Description
No error found.
1 error found and fixed.
2. the disk has been cleared (for example, fragment collection), or the disk has not been cleared because/F is not specified.
3 because the/F option is not specified, the disk cannot be checked, the error cannot be repaired, or the error is not fixed.
The fault recovery console provides the chkdsk command with different parameters.
Example
If you want to check the disk in drive D and repair windows errors, type:
Chkdsk D:/F
If an error occurs, chkdsk pauses and displays the message. When the chkdsk completes the task, a report with disk status is displayed. You cannot open any files on the specified drive unless the chkdsk has completed the task.
On the fat disk, to check the non-adjacent blocks of all files in the current directory, type:
Chkdsk *.*
The chkdsk displays the status report and then lists the files that meet the non-adjacent block conditions.