Deleting files and folders in TC9

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Deleting files and folders in TC9

Post 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).
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6492
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

+1
Fully agree
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post 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.
#5767 Personal license
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post 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'?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Okay - do you have an idea how the above list can be achieved using the current beta version?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, I don't think that it's possible.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post 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)?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
I see - this are bad news :(
Why can't Mickeysoft do proper model parts of a MVC struture?
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post 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?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
Post Reply