I just noticed today that I am having a problem with nonempty folders being deleted by my function. I am using Delete FAILNOTEMPTY NORECYCLE QUIET command to delete folder. I thought this would prevent nonempty folders from being accidentally deleted (based on past help on the forum). Either I misunderstood or I made a mistake implementing the command.
Before the function is called the item is checked to make sure it is a directory then this function is used to delete the folder.
function deleteFolder(path) {
DOpus.Output("Deleting folder: " + path);
cmd.ClearFiles();
cmd.AddFile(path);
cmd.Runcommand("Delete FAILNOTEMPTY NORECYCLE QUIET");
}
This function is deleting folders with files in them and the files are larger than 0.
Help, what did I do wrong?