Feature Request: New command for Explorer delete method

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
WatchUer
Senior Member
Senior Member
Posts: 242
Joined: 2003-02-22, 10:46 UTC
Location: China

Feature Request: New command for Explorer delete method

Post by *WatchUer »

The TC's internal delete method lacks for handling folder, the deleted folder name can not appear in the trash, only the files appear in the trash, if you just delete a empty folder, it's just totally deleted, you have no chance to recovery the folder name, and the speed of internal delete method is slow, but as I use file comment, so TC's internal delete method is essential to be default.

When I delete folder(s), I normally first select the folders then Shift + F10(Context Menu), then 'D' to use the Explorer delete method, it's really not convenient.

In the configuration dialog, there is a option: Use Explorer delete method(faster, cannot handle comment), I'd like to have a new internal command as cm_ExplorerDelete to use the Explorer delete method separately, so I can assign a keyboard shortcut to it and use it as like.

Hope it will be implemented in the forthcoming TC7 if it's not difficult to be accomplished. :wink:

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is the following: The function SHFileOperation which is used to delete to recycle bin doesn't allow to determine whether the file/dir will really go to recycle bin or not. If it does, then all is OK (deletion of entire folders is instntaneous). If it doesn't it could take a LOT of time because Windows is deleting all files individually, and it CANNOT be aborted! That's why Total Commander has to delete all files one by one.

The alternative is to check the option "use Explorer delete method" in Configuration - Copy/Delete. Then the deletion is performed as in Explorer. The downside is that comments cannot be removed for files from descript.ion.
Author of Total Commander
http://www.ghisler.com

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

Post by *Lefteous »

2ghisler(Author)
he alternative is to check the option "use Explorer delete method" in Configuration - Copy/Delete. Then the deletion is performed as in Explorer.
I remember that I suggested to enhance the Explorer delete method. There should be a new setting which uses the Explorer method only for "move to recycle bin" but still uses the internal method for deleting.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There should be a new setting which uses the Explorer method only for "move to recycle bin" but still uses the internal method for deleting.
So do you know a way to determine whether a deletion on a specific drive goes to recycle bin or not?
Author of Total Commander
http://www.ghisler.com

User avatar
corny
Junior Member
Junior Member
Posts: 96
Joined: 2003-02-07, 10:06 UTC

Post by *corny »

I know it isn't a preferrable way of determining settings, but the handling of recycle bin is saved in the registry: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket

AFAIK, there is no API call to determine the behaviour of the recycle bin.
Regards,
Cornelis

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

Post by *Lefteous »

2ghisler(Author)
No - why are you asking me this again and again? You can be sure that I will give you a hint if I stumble over a possible solution.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Because you wrote this:
There should be a new setting which uses the Explorer method only for "move to recycle bin"
To do this, it's necessary to know when a file/folder would be deleted to recycle bin and when it would be deleted directly.
Author of Total Commander
http://www.ghisler.com

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

Post by *Lefteous »

2ghisler(Author)
No I guess you misunderstood my request. When the uset set Win95Delete to 1 you call ShFileOperation with the allowundo flag when I press F8. When I press Shift+F8 you call ShFileOperation without allowundo.
I want to use the first described behavior but not the second. To accomplish this a new option value for Win95Delete could be introduced.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39418
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's not correct - when you press Shift+F8, I don't call SHFileOperation, I call DeleteFile directly!
Author of Total Commander
http://www.ghisler.com

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

Post by *Lefteous »

2ghisler(Author)
That's not correct - when you press Shift+F8, I don't call SHFileOperation, I call DeleteFile directly!
That's not correct!
Here is a screenshot:
http://www.lefteous.de/tc/images/misc/shdelete.png


That doesn't looks like DeleteFile...

User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 849
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

Who is TC author among you? :mrgreen:
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..

User avatar
WatchUer
Senior Member
Senior Member
Posts: 242
Joined: 2003-02-22, 10:46 UTC
Location: China

Post by *WatchUer »

Thank you for your explanation. Mr.Ghisler, but sorry, I don't quite understand.

I just want a new internal 'cm_' command, this 'cm_' command(for example its name is 'cm_ExplorerDelete') explicitly use the "Explorer delete method" to delete folders or files.
When I use the new internal command 'cm_ExplorerDelete' to delete sth, the delete action will perform as if I have checked the option "use Explorer delete method" in Configuration - Copy/Delete.
With 'cm_ExplorerDelete', I can assign this new internal command a keyboard shortcut, and use it as like.

At present, there is two ways if I want to use the "Explorer delete method": First, as you said I must check the option "use Explorer delete method" in Configuration - Copy/Delete, but the nagative is file comment can not be handled. Second, see my first post, use the keyboard Shift + F10, then press 'D', then Enter, it will use the "Explorer delete method", but it's really not convenient.

Ah, for clarification, my setting of recycle bin is default, I change nothing about the recycle bin, in Windows Explorer, the deleted folders or files goto the recycle bin directly.

User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

A button for me…

Post by *Clo »

2WatchUer

:) Hello !

I support your request, since indeed such a command should be handy.
- When one wants to change often the delete method when needed, a simple shortcut
(or rather a bistable button for me) could do the trick perfectly.

:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials

User avatar
majkinetor !
Power Member
Power Member
Posts: 1579
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

I can't beleive I am reading this!
Habemus majkam!

Post Reply