0

If I use this syntax:

sdelete64.exe -p 3 -c 1% C

...where:

-p 3 sets number of overwrite passes to 3
-c 1% sets amount of space to leave free to 1%
C Specifies drive letter C:

... I get the error message:

SDelete is set for 3 passes
Cleaning disk C:
Error opening disk C:
The system cannot find the file specified

What am I doing wrong?

5
  • Have you tried using C: instead of just C?
    – DavidPostill
    Commented Jul 2, 2022 at 18:29
  • I also doubt very seriously that you should include the percent sign with -c. Percent sign is magic to cmd.exe. Commented Jul 2, 2022 at 18:34
  • I used sdelete64.exe -p 3 -c 1% C: before, and then the error message was Error opening disk C::
    – David.P
    Commented Jul 2, 2022 at 19:55
  • 1
    @David.P Give this a shot sdelete -c1 -p 3 c: and if there are still issue, run it from cmd elevated as administrator. Commented Jul 3, 2022 at 3:23
  • Ahh the documentation really is poor - it suggests a space between -c and percent but looks like there isn't a space. So -c1 is leave 1% disk space when writing the clear file? Commented Mar 5 at 13:45

1 Answer 1

1

1. First solution (failed)

You were mislead by a weak Microsoft documentation:

https://docs.microsoft.com/en-us/sysinternals/downloads/sdelete

Microsoft does not explain or gives an example how to state a drive letter.

Sdelete tried to delete a file named c on your current drive.

Try out adding : as requested by DavidPostill.

2. Second solution proposal

Hint: Free space is a property of a file system. A physical disk with no partion or volume on it has only space but no distinction between used and unused (free) space.

Remove all partitions from your target disk and read out the physical disk number in disk management. Run sdelete(64) using the physical disk number instead of the volume label.

3
  • I used sdelete64.exe -p 3 -c 1% C: before, and then the error message was Error opening disk C::
    – David.P
    Commented Jul 2, 2022 at 19:54
  • Could you reduce the parameters to a minimum like "sdelete64 -z c:"? Could you try the 32-bit-version of "sdelete"?
    – r2d3
    Commented Jul 2, 2022 at 22:12
  • I added a second solution proposal.
    – r2d3
    Commented Jul 2, 2022 at 22:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .