chkdsk, can it clean up the drive too?

larryhyman

Prominent
Oct 30, 2017
2
0
510
0
can i get chkdsk to automatically delete files with bad sectors?

you heard me right, i do not want to recover those files, i want to delete them, there about 10 or so files, when i was doing a chkdsk /r it kept telling me that I did not have enough space to recover those files, so I am stuck with a bunch of bad files that I would like to delete, i have backups
 

USAFRet

Splendid
Moderator
No, there does not appear to be a DELETE function in chkdsk.

https://technet.microsoft.com/en-us/library/bb490876.aspx

Syntax

chkdsk [volume:][[Path] FileName] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:size]]

Parameters

volume : : Specifies the drive letter (followed by a colon), mount point, or volume name.

[ Path ] FileName : Specifies the location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use wildcard characters (that is, * and ?) to specify multiple files.

/f : Fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer.
/v : Displays the name of each file in every directory as the disk is checked.
/r : Locates bad sectors and recovers readable information. The disk must be locked.
/x : Use with NTFS only. Forces the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
/i : Use with NTFS only. Performs a less vigorous check of index entries, reducing the amount of time needed to run chkdsk.
/c : Use with NTFS only. Skips the checking of cycles within the folder structure, reducing the amount of time needed to run chkdsk.
/l [: size ] : Use with NTFS only. Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size.
/? : Displays help at the command prompt.
 

larryhyman

Prominent
Oct 30, 2017
2
0
510
0


Windows 10

BTW-> I did manually delete the file (there was only 10)

but the reason I ask this is what if there over 100 files to replace.......

 

USAFRet

Splendid
Moderator
No, there does not appear to be a DELETE function in chkdsk.

https://technet.microsoft.com/en-us/library/bb490876.aspx

Syntax

chkdsk [volume:][[Path] FileName] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:size]]

Parameters

volume : : Specifies the drive letter (followed by a colon), mount point, or volume name.

[ Path ] FileName : Specifies the location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use wildcard characters (that is, * and ?) to specify multiple files.

/f : Fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer.
/v : Displays the name of each file in every directory as the disk is checked.
/r : Locates bad sectors and recovers readable information. The disk must be locked.
/x : Use with NTFS only. Forces the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
/i : Use with NTFS only. Performs a less vigorous check of index entries, reducing the amount of time needed to run chkdsk.
/c : Use with NTFS only. Skips the checking of cycles within the folder structure, reducing the amount of time needed to run chkdsk.
/l [: size ] : Use with NTFS only. Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size.
/? : Displays help at the command prompt.
 
Thread starter Similar threads Forum Replies Date
A Laptop Tech Support 1
Arom_pd Laptop Tech Support 2
B Laptop Tech Support 1
D Laptop Tech Support 3
F Laptop Tech Support 4
K Laptop Tech Support 1
K Laptop Tech Support 3
C Laptop Tech Support 2
P Laptop Tech Support 1
E Laptop Tech Support 3
I Laptop Tech Support 1
I Laptop Tech Support 1
D Laptop Tech Support 7
M Laptop Tech Support 5
D Laptop Tech Support 4
J Laptop Tech Support 4
P Laptop Tech Support 1
M Laptop Tech Support 2
G Laptop Tech Support 4
J Laptop Tech Support 2

ASK THE COMMUNITY