Page 1 of 1

Deleting files and folders in TC9

Posted: 2016-06-26, 07:00 UTC
by Lefteous
I posted some bugs related to deleting. Some are clearly bugs, in some cases I'm not sure what the desired behavior really is. So I think it's time to start a discussion about deleting stuff in TC 9.

There is a new capability of TC 9 to detect if a file or folder can be moved to trash or not before trying it. My concern is that the delete options are really confusing. So I write down my requirements for deleting stuff/moving to trash and wanted to hear if it's already possible. In the following I use the term delete for both operations.

1. I want to delete as fast as possible.
2. I want to see only TC confirmation dialogs.
3. Windows settings should not change the behavior in TC.
4. I want to get a confirmation prompt before deleting files/folders having on of the attributes H, S or R (configurable).
5. I want to get a confirmation prompt before deleting empty folders (configurable).

Posted: 2016-06-26, 08:50 UTC
by Horst.Epp
+1
Fully agree

Posted: 2016-06-26, 15:30 UTC
by sqa_wizard
My concern is that the delete options are really confusing.
Using TC internal deletion process is straight and clear.
It gets confusing if deletion is delegated to windows. Now MS stuff rules are followed and you don't have any influence on it.
Note: Even using the Recycle Bin involves windows procedures.

I fear there is not much one can change about.

Delete without Recycle Bin will catch item 1-4 for files.

Concerning item 4 and 5 for folders I fully agree too.

Posted: 2016-06-27, 07:44 UTC
by Lefteous
2sqa_wizard
Using TC internal deletion process is straight and clear.
As VistaDelete=-1 is the default how can it be straight and clear to use the 'internal deletion process'?

Posted: 2016-06-27, 13:53 UTC
by ghisler(Author)
VistaDelete is not really delegating anything to Microsoft - it uses the new OLE file operations API's IFileOperation introduced with Windows Vista. Unfortuantely you can't just turn off all the confirmation dialogs coming with these APIs because they would then just fail silently instead of calling callback functions.

Posted: 2016-06-27, 14:30 UTC
by Lefteous
2ghisler(Author)
Okay - do you have an idea how the above list can be achieved using the current beta version?

Posted: 2016-06-27, 15:10 UTC
by ghisler(Author)
No, I don't think that it's possible.

Posted: 2016-06-28, 09:13 UTC
by Lefteous
Okay and would it be possible to have a differentiation between delete / move to trash while VistaDelete is set to 0 (no matter if global delete confirmation is turned on)?

Posted: 2016-06-28, 20:47 UTC
by ghisler(Author)
Currently TC shows the warning about deleting to recycle bin when Windows calls back to TC in the VistaDelete. In this function, it tells TC whether it deletes to recycle bin or not. The function to determine this before deleting anything seems unreliable - there are many cases when the drive would support deleting to recycle bin but actually wouldn't e.g. recycle bin full, path too long, recycle bin damaged etc.

Posted: 2016-06-29, 08:13 UTC
by Lefteous
2ghisler(Author)
I see - this are bad news :(
Why can't Mickeysoft do proper model parts of a MVC struture?

Posted: 2016-07-06, 21:13 UTC
by Lefteous
2ghisler(Author)
06.07.16 Added: Changed how VistaDelete handles recycle bin: Assume that the values from the registry are always correct, the show an error when requesting delete to recycle bin wants to delete directly (32/64)
I didn't really understand what has been changed and how it could be tested. Could you give more please?

Posted: 2016-07-07, 13:42 UTC
by ghisler(Author)
If VistaDelete is on and the Explorer method is off, TC will now work like this:
1. If delete confirmation is on: Let the Explorer show the confirmation
2. If delete confirmation is off: Check whether the drive with the selected files supports the recycle bin. If yes, show the message that the files will be deleted to recycle bin. When the operation starts, Windows sends a callback for each file which tells TC whether the file will be deleted to recycle bin or not. If it does NOT, then it would be contrary to the confirmation dialog, so TC will show an error and abort.