[***
DeleteFile already support NODIALOG option.. and RECYCLE. it is actually the documentation that misspell it. the code actually require it as RECYCLE
// Deletes all selected files to recycle. No confirm dlg, no progress
@var $filenames = GetSourceSelectedPaths();
@var $options[] = {"NODIALOG", "RECYCLE", "NOPROGRESS"};
DeleteFiles( $filenames, $options);
Thanks for the info Mathias.
I tried RECYCLE & it seemed to fail in the debugger, when I added it as RECYLE it worked (!) so I figured that it was just sth that slipped through.
& it
has been working for weeks as a button, it was adding NODIALOG that caused it to fail... perhaps somehow the combo of RECYLE with NODIALOG reveals the error?
Running the debugger today the options all appear to work (I didn't realize that I could use NOPROGRESS) with the caveat that the files selected do not appear to go to the recycle bin, & running this routine in the debugger multiple times caused MC to simultaneously close when I closed the Explorer recycle bin window (this had been opened
after the routine to check for the files). Did it 3 times in a row.
Wondering if the options need to be in the order shown or if can I use them in any sequence?
I will have to try & fully test all this again later on.....
I will let you know what I find
