I'm writing a program which over it's life time the end users will create and delete a lot of records and folders.
The Recycle Bin must NOT to be used at all when content is being deleted.
I want the operator to be able to press 1 button which will see all the records in a folder deleted, along with the folder itself.
For records this is no problem, you can deleted them without them getting move to the recycle bin. But for the empty folder that's left after the records have been truly deleted, that gets dumped into the recycle bin.
Any idea on how to get around this? I don't see any functions that can be called upon to control the recycle bin.
You are right.There is no command to delete the folder directly.
But using the "Delete folder()" command two times continuously in the script will ask the user to confirm the deletion and this solve your purpose to.
Yes the delete action will transfer folder to recycle bin and a second delete will totally remove folder but can you be sure correct folder is deleted by users? Accidently removing a record is one thing but a complete folder is another.
Would add "Back Up" action on first line of any script and possibly a check on number of records in folder with if statement (hopefully 0). Not something I have ever really done but it might be possible to do other checks with the internal "system variables"
Seems a double delete is the only option.
I'll have to contact the client and try put a positive spin on this as a better option than what they asked for. They were very specific in specifying what the wanted, and out of everything they asked for, a “silent” delete is the one thing I can't give them.