Delete individual file when few (or all files) are selected

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Delete individual file when few (or all files) are selected

Post by *eugensyl »

Exactly like title:

Delete individual file/directory when few (or all) files from panel are selected.


Sometimes can be useful to delete one single file when you select few files.
Shortcut for that can be SHIFT-DEL.

After deleting (of the single file), the selection must be the same like before.


Best wishes,
My Best Wishes,

Eugen
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

Shortcut for that can be SHIFT-DEL.
That is already assigned. Good thing you didn't think of Ctrl+Alt+Del.
TC for Linux please!
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Post by *eugensyl »

roentgen wrote:
Shortcut for that can be SHIFT-DEL.
That is already assigned. Good thing you didn't think of Ctrl+Alt+Del.

Thanks for your quick answer. But I'm afraid I miss understand you.
Ctr+-Alt+Del is classical master shortcut of operating system.

If request exist, I will arise the hat from my head.
But is undocumented or I don't know nothing about it.

I was inspired because an action is possible with one single file when few files are selected. For instance, the file under cursor can be viewed through F3, even than more files are selected.

Maybe edit (F4) , delete (F8/Del) and, why not, copy/move (F5/F6) actions it would be nice to be possible, certainly with different shortcuts, for file under cursor when more than one file are selected.

Thank you again for your answer.


Best wishes,
My Best Wishes,

Eugen
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

2roentgen: nice sidekick :)

2eugensyl: your suggestion is against all well known standard behavior of all programs and coding guidelines I know.
Performing command with an active selection will ALWAYS use the whole selection.

If you want to do a command to a single file while you have an active selection, just :
- save the selection to file
- unselect all
- do your command
- load selection from file
#5767 Personal license
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

your suggestion is against all well known standard behavior of all programs and coding guidelines I know.
Performing command with an active selection will ALWAYS use the whole selection
IIRC Dos Navigator also had shortcuts to only use the file under cursor for operations (and I support this in TC, too).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Performing command with an active selection will ALWAYS use the whole selection
If [Configuraion] Viewertype=0 is set then pressing F3 only shows file under cursor, not all selected files.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

If [Configuraion] Viewertype=0 is set then pressing F3 only shows file under cursor, not all selected files.
You are right, but using the wrong setting or shortcut in this case will not harm anything (even in worst case).

Using the wrong setting or shortcut in case of deletion will (worst case) erase all selected files !
Very dangerous option IMO ...
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Very dangerous option IMO ...
I Agree.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Post by *eugensyl »

roentgen wrote:
Shortcut for that can be SHIFT-DEL.
That is already assigned.
Yes, It is. But the context is different. It works only in combo lists if somebody doesn't know.

BTW, is NO RISK to delete only file under cursor with *-DEL if the focus is into files window with more than two files/folders selected AND a warning message will appear anyway. This is the confirmation of intention.

IMHO is necessary to put this file (single deleted file) in Recycle Bin as an exception at configuration rule, always. Or use a reasonable timeout for DeleteDelay.

Win95Delete=-1
UseTrash=1
DeleteDelay=0

Here can be another switch:
DeleteExpert=1

which can enable such a feature.

Maybe CTRL-DEL is better to use for this feature because is not used yet and preserve function of Shift-Del (remove permanent selected files/folders without Recycle Bin).

Also the actual warning message can be improved with a additional message, only if Shift key is hold, even with mouse action (drag&drop above F8 button):
"WARNING! This is a PERMANENT delete action!"
My Best Wishes,

Eugen
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

eugensyl wrote:It works only in combo lists if somebody doesn't know.
Not only there. Shift+Del removes all files directly while Del puts them into Recycle Bin (or vice versa, if the corresponding option selected).

However, this command could be implemented as a usual cm-command (just like cm_RenameSingleFile) without any hotkey by default.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Post by *eugensyl »

Flint wrote:
eugensyl wrote:It works only in combo lists if somebody doesn't know.
Not only there. Shift+Del removes all files directly while Del puts them into Recycle Bin (or vice versa, if the corresponding option selected).

However, this command could be implemented as a usual cm-command (just like cm_RenameSingleFile) without any hotkey by default.
I agree!
It's a good idea.

Usually I need this function when I looking for duplicate files, photo for example, and I select some of them. If only a file, other than the hole selection, must be deleted until the some files are selected, it's very difficult. A lot of actions are necessary to preserve selection and to delete one file.

Dos Navigator, which is no so obsolete, has also this function. And a lot of information on status line in each window. But this is another topic.
My Best Wishes,

Eugen
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

eugensyl wrote:If only a file, other than the hole selection, must be deleted until the some files are selected, it's very difficult.
Workaround while this is not implemented:

Code: Select all

del <Ctrl + Enter> <Enter>
...will delete the file under the cursor. Afterwards the key "/" (on NumPad) will restore the selection.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Post by *eugensyl »

StatusQuo wrote:
eugensyl wrote:If only a file, other than the hole selection, must be deleted until the some files are selected, it's very difficult.
Workaround while this is not implemented:

Code: Select all

del <Ctrl + Enter> <Enter>
...will delete the file under the cursor. Afterwards the key "/" (on NumPad) will restore the selection.
Thank you!
I will consider this.
But this is really dangerous.
It's a good point to make an alias or an external command with a warning message.

How can I pass the TC parameter "%L" into cmd file ?
TC don't allow internal command of OS with parameters?
My Best Wishes,

Eugen
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

eugensyl wrote:How can I pass the TC parameter "%L" into cmd file ?
%L would mean a listfile containing a list of all selected files, but you wanted to delete just one file, not those selected, didn't you?
I don't quite understand, how %L could be useful for this.
If you just need to feed the complete path, you could use Ctrl+Shift+Enter instead of just Ctrl+Enter.
eugensyl wrote:TC don't allow internal command of OS with parameters?
It does, using another workaround:
as command, instead of del use %COMSPEC% /C del
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Post by *eugensyl »

StatusQuo wrote:
eugensyl wrote:How can I pass the TC parameter "%L" into cmd file ?
%L would mean a listfile containing a list of all selected files, but you wanted to delete just one file, not those selected, didn't you?
I don't quite understand, how %L could be useful for this.
If you just need to feed the complete path, you could use Ctrl+Shift+Enter instead of just Ctrl+Enter.
eugensyl wrote:TC don't allow internal command of OS with parameters?
It does, using another workaround:
as command, instead of del use %COMSPEC% /C del
Unfortunately %L is wrong as you sad. Maybe %N is better.
Idea is to make a cmd file with a warning message, something like this:

echo off
echo Now, you will delete permanently the file under cursor %%N
echo Press Ctrl-Break if this action is a mistake.
pause
%COMSPEC% /C del "%N%M"
if exist %N goto z
echo The file under cursor was deleted.
goto final
:z
echo The file under cursor was NOT deleted.
:final
pause
exit

This example don't work.
The problem is to pass parameter "%N" into cmd file in order to make a external command or a simple button.
My Best Wishes,

Eugen
Post Reply