Hi.
How can I get list of selected files and directories (with full paths and only names)? Only for selected. If there are no selection - the list must be empty.
Commands 2017 and 2018 works not fine for me - they copy to clipboard name of file/directory under cursor if no selection in panel.
Maybe there some tricks for it?
Or even better Autohotkey realization?
How to get list of selected files?
Moderators: Hacker, petermad, Stefan2, white
How to get list of selected files?
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Re: How to get list of selected files?
The current behaviour is :LonerD wrote:Hi.
How can I get list of selected files and directories (with full paths and only names)? Only for selected. If there are no selection - the list must be empty.
Commands 2017 and 2018 works not fine for me - they copy to clipboard name of file/directory under cursor if no selection in panel.
Maybe there some tricks for it?
Or even better Autohotkey realization?
If no file is selected, you get the current file.
If one or more files are selected you get only the selected one !
You can get all files insisde a temporary file using %L %l %F %f in command parameters...
You can get all in the command line using %S or %P%S ...
AutoHotKey UI script with Total Commander 64Bit is not very used anymore

--Edited:
If you speak russsian, you can give a look to TCIMG or ask in russian forum !
I made it !!Autohotkey realization?
Code: Select all
; Copy to clipboard list of only selected files and directories
#NoEnv
#NoTrayIcon
#MaxMem 1024
#SingleInstance force
SetBatchLines, -1
If not ( WinExist("ahk_class TTOTAL_CMD") || WinActive("ahk_class TTOTAL_CMD") )
ExitApp
Clipboard := ""
WinGet, hw_TTOTAL_CMD, ID, A
ControlGetFocus, aControl, % "ahk_id " hw_TTOTAL_CMD
SendMessage, 0x190, , , % aControl, % "ahk_id " hw_TTOTAL_CMD
CountItems = %ErrorLevel%
SendMessage, 0x187, 0, , % aControl, % "ahk_id " hw_TTOTAL_CMD
UpLevel = %ErrorLevel%
if (( CountItems > 1 ) || ( ( CountItems = 1 ) && ( UpLevel != 1 )))
SendMessage, 0x433, 2021,,, % "ahk_id " hw_TTOTAL_CMD
ExitApp
Yes, I know the author, he gave some ideas.))If you speak russsian, you can give a look to TCIMG or ask in russian forum !
Maybe. But I write simple scrips and don't have troubles.AutoHotKey UI script with Total Commander 64Bit is not very used anymore
Only problem is different Class names, but we can check is TC 64bit or 32bit, and use the fit Classes.
For example - it's my small script to scroll tabs in 32/64bit TC.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Re: How to get list of selected files?
Hi.
This is an old thread, but I think it still applies.
How to get the list of ONLY selected files? Just like the OP wrote, if no files are selected the list should be empty.
(That is because if no files are selected, the program I am passing the list to should use the clipboard instead.)
This is an old thread, but I think it still applies.
How to get the list of ONLY selected files? Just like the OP wrote, if no files are selected the list should be empty.
(That is because if no files are selected, the program I am passing the list to should use the clipboard instead.)
Re: How to get list of selected files but ONLY if something IS really selected?
Notme wrote: 2021-04-09, 10:14 UTC
How to get the list of ONLY selected files? Just like the OP wrote, if no files are selected the list should be empty.
F1 > search for "dialog" > Dialog box: Configuration - Change button bar
%Y anywhere in the parameters:
Pass empty list to program when using one of the List parameters like %L and nothing is selected.
Otherwise, the file under the cursor would be passed.
To work with the selected files use TCs parameter like %L, %F or %S or others (see help > F1 > search for "dialog" > Dialog box: Configuration - Change button bar).
If no file is selected, the current file under the cursor would be passed.
If one or more files are selected you get only the selected one.
You can use now the newer %Y paramter to pass an empty list when using one of the above parameters and nothing was selected.
03.05.18 Release Total Commander 9.20 beta 1 (32/64)
04.04.18 Added: New button bar parameter %Y anywhere in the parameter list:
Allow empty lists when nothing is selected for parameters %S, %R, %L, %l, %F, %f, %D, %d, %WL, %WF, %UL and %UF (32/64)
Re: How to get list of selected files?
Duhh....
how can I have missed that?
Thanks for opening my eyes

Thanks for opening my eyes
