I have obtained the Microsoft Sysinternals SDelete software for the purpose of securely deleting files on my laptop. After reviewing the documentation and help resources, I discovered that the “-s” option enables the deletion of files in subdirectories, while the “-r” option removes the read-only attribute. To utilize these options, I input the appropriate command in an administrator prompt:

sdelete -s -r c:\Users\guest\Documents

Whenever I attempt to delete the directory at “path/to/directory”, I consistently encounter an error message stating “The directory is not empty“. Is there a resolution to this issue that doesn’t entail executing a command for each subdirectory individually? I have also attempted to use sdelete64, but I experienced the same outcome.

Although I am not concerned with files that cannot be erased due to being in use or any other reason, I would like to remove as many as possible.

Thank you for any assistance you can provide.

Askify Moderator Edited question April 30, 2023