How can I select all files with the same name ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
georges
Junior Member
Junior Member
Posts: 10
Joined: 2005-08-21, 21:19 UTC

How can I select all files with the same name ?

Post by *georges »

I think it may be useful to add theses shortcuts : :roll:
SHIFT+ALT+NUM + select all files with the same name
SHIFT+ALT+NUM - remove selection from files with the same name
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

georges
This can be done via some script which you can assign to every hotkey. First, copy into the clipboard the file name, then remove its extension, call the TC function for selectiong the files, insert the name there and press OK. I don't use scripts for TC, so I cannot write the full code. Maybe, someone else will.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I have created a little AutoHotkey-script, only downside is that it doesn't work in branch view till now. When there is enough interest I'll do that, too. Feedback please... ;)

Code: Select all

$!+NumpadAdd::
IfWinActive, ahk_class TTOTAL_CMD
{
  clipboard_backup := ClipboardAll
  SendMessage 1075, 2017, , , A ; Copy Selection To Clipboard
  selection_backup := ClipboardAll
  SendMessage 1075, 524, , , A ; Unselect all
  SendMessage 1075, 2017, , , A ; Copy Filename To Clipboard
  dot_position := InStr(clipboard, ".", 0, 0) - 1
  StringLeft, filename, clipboard, dot_position
  If filename = 
    filename := clipboard
  clipboard := selection_backup
  SendMessage 1075, 2033, , , A ; Restore Selection From Clipboard
  clipboard := filename
  PostMessage 1075, 521, , , A ; Spread Selection
  Send, ^v*{Enter}
  Sleep, 1000
  clipboard := clipboard_backup
}
Else
  Send, !+{NumpadAdd}
Return


$!+NumpadSub::
IfWinActive, ahk_class TTOTAL_CMD
{
  clipboard_backup := ClipboardAll
  SendMessage 1075, 2017, , , A ; Copy Selection To Clipboard
  selection_backup := ClipboardAll
  SendMessage 1075, 524, , , A ; Unselect all
  SendMessage 1075, 2017, , , A ; Copy Filename To Clipboard
  dot_position := InStr(clipboard, ".", 0, 0) - 1
  StringLeft, filename, clipboard, dot_position
  If filename = 
    filename := clipboard
  clipboard := selection_backup
  SendMessage 1075, 2033, , , A ; Restore Selection From Clipboard
  clipboard := filename
  PostMessage 1075, 522, , , A ; Shrink Selection
  Send, ^v*{Enter}
  Sleep, 1000
  clipboard := clipboard_backup
}
Else
  Send, !+{NumpadSub}
Return
Icfu
Last edited by icfu on 2005-08-22, 08:37 UTC, edited 1 time in total.
This account is for sale
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

2icfu

Thank you, very useful. And it saved me a lot of brain lard ;) :P.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
georges
Junior Member
Junior Member
Posts: 10
Joined: 2005-08-21, 21:19 UTC

Post by *georges »

Thanks for your script icfu, it's working.
But perhaps Christian ghisler should add these shorcuts & commands inside Total Commander :
SHIFT+ALT+NUM : cm_SelectCurrentName=nnn;Select all files with same name.
SHIFT+ALT+NUM : cm_UnselectCurrentName=nnn;Unselect all files with same name.
:idea:
Perhaps it could be useful for some users.
User avatar
ManDark
Junior Member
Junior Member
Posts: 47
Joined: 2004-01-24, 12:39 UTC
Location: Slovakia
Contact:

Post by *ManDark »

Listen i'm using home 6.52 version of TC i have configured the Colors for some extension types and for me it works like no problem when i stand with cursor on *mp3 and i press "*" it select only *.mp3 or the same *.zip, this is alsou when i select the colored files or non, so whats the problem how can it work like this so sinmple ....

When you people making a problem here ?
I love Total Commander
It's a COOOL Manager and Fully configurable
My actual version is v6.52 -changed
User avatar
Hacker
Moderator
Moderator
Posts: 13141
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

ManDark,
Same name, not same extension.

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
georges
Junior Member
Junior Member
Posts: 10
Joined: 2005-08-21, 21:19 UTC

Post by *georges »

For example, sometimes I have to delete a multiple file archive like filename.RAR ... filename.xxx in a directory containing others multiple file archives.
So I think this command would be useful.
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

2georges
One solution today:
make a button/starter menu entry/directory hotlist entry with
command: cd
parameters: .\%O.*

0th: cursor on the wished file
1st: press button - only files with names of file will be shown
2nd: press CTRL+A (mark all files)
3rd: make what you want to do
4th: don't forget to press CTRL+F10 (all files will be shown again)
User avatar
georges
Junior Member
Junior Member
Posts: 10
Joined: 2005-08-21, 21:19 UTC

Post by *georges »

thanks norfie for your solution.

I've tried also with the Expand Selection / Define Solution / Plugins
but i don't find a solution with the field "value". %O is not reconized as a special parameter.
User avatar
szlori
Senior Member
Senior Member
Posts: 263
Joined: 2005-01-17, 07:12 UTC
Location: Sydney

Post by *szlori »

2georges
%O is only recognized in the places norfie explained...
Post Reply