Does waiting a moment and clicking Retry also work, or do you keep seeing the same error?
Is the folder actually empty, or are there still things left in it? (Check for hidden/system files as well. If using Opus, you can click the hidden count on the status bar to disable all filtering and show everything.)
(A file delete can succeed but leave the file still there in a "pending delete" state until something else which has the file open closes it. It's rare but would be a legitimate cause of that error message. Happens most often with video files, in my experience, due to the way some video components open them. You should still see the file in the directory in that case, though.)
If it only happens on a NAS then it could be the NAS doing something unusual on its side, but if it also happens on local drives and the folders really are empty then it's unexpected. Antivirus or similar tools could be involved, perhaps, as they can modify the way the filesystem APIs behave.
Retry just shows the error again immediately, only way out is to abort.
The folder isn't empty, but I shouldn't need to go through the delete every file and folder by hand should I? I don't have to with File Explorer.
I've tried it on newly created, but unopened folders.
I've also tried it on folders I've not accessed for months or years.
This isn't a NAS, this is my local machine, albeit, not on my main hard drive.
The strange thing is, only Directory Opus has this issue. I can get the error, then immediately try deleting the exact same folder in File Explorer and no issues, the folder gets deleted.
Also, this doesn't just happen with the odd folder, this happens for all folders. But just tested, on my main drive (SSD) where Windows is installed, I don't get an error, it is only on my 2nd drive (HDD).
If you make a folder on the same drive with just some .txt and .jpg files in, does it have the same problem?
A bin folder might have things inside which antivirus is still scanning, perhaps. Using the Recycle Bin may also be avoiding the problem as it really just moves the files rather than deleting them.
I used File Explorer to create a new folder at the same level as the bin folder, and added an image, a blank text file and a blank excel file, then went and shift+deleted it in DOPUS and it deleted fine, no errors.
The logs show that the bin\Debug directory on that drive was flagged as reparse point. That usually means it's a junction or symbolic link or mount point or similar, but can (rarely) have other meanings.
If a directory is flagged as a reparse point, Opus won't try to delete the things under it, on the assumption they're likely to be part of another directory which the thing being removed is only pointing to and not the real owner of. The aim is to remove the junction/link but not delete the things it pointed to somewhere else.
The question is why it's flagged in that way. Is there anything unusual about it? Is it actually a link to something else? Or are any tools being used that do unusual things with the filesystem (e.g. blocking access to folders)? Cloud storage or sync tools affecting the folder or its parents? If we can understand what the directory is then we may be able to check for the situation.
That explains it, and was a bug on our side, which I've just fixed.
The fix will be in the next beta.
While testing, I found the same problem happens with OneDrive folders. (It's surprising this wasn't seen/reported before now. I guess most people who use OneDrive also use the recycle bin.)
The best workaround for the time being is to use the recycle bin, if possible, since that shouldn't be affected by the issue.