Drag and drop several files to button bar
Moderators: Hacker, petermad, Stefan2, white
Drag and drop several files to button bar
Hi,
I'm not sure whether my question is related to Total Commander at all or it's just a basic windows issue.. but I'd be happy if someone could help me anyway!
I have to use a batch file quite often so I've configured a button for it. The problem is that I can not use it in bulk. I mean it would be useful to be able drag and drop more than one files at the same time. But when selecting the files and drop them to the icon only one of them is processed!
Does onyone know a workaround?
Thanx a lot!
Zoltan
I'm not sure whether my question is related to Total Commander at all or it's just a basic windows issue.. but I'd be happy if someone could help me anyway!
I have to use a batch file quite often so I've configured a button for it. The problem is that I can not use it in bulk. I mean it would be useful to be able drag and drop more than one files at the same time. But when selecting the files and drop them to the icon only one of them is processed!
Does onyone know a workaround?
Thanx a lot!
Zoltan
Depends on how you process them. You could try and use the %L parameter (see Button Bar Help) with lst2str or lst2mlt (see Addons under http://www.ghisler.com/ ) .
HTH
Roman
P.S. Siofok rulezz!
HTH
Roman
P.S. Siofok rulezz!
Hi,
Thanks for the tip! I tried it but without any success:( The case is that my .bat file in the button bar contains java (anothe one pearl) calling with several parameters inside. It means:
- I can not make direct .bat calling using 'lst2multi' or 'lst2str' as they support only .exe files
- I tried to call java.exe directly with parameters in the /B:"" block but in that case java was not even started. Instead of it file (only one) was opened with associated program for the given extension. Which I saw is a kind of default for /X:"" parameters.
Anyway, thanks for the help! I did not know about these addons. I still hope that they can help me so I keep trying to get them working;)
Br,
Zoltan
Ps. My favourite is Szentendre;)
Thanks for the tip! I tried it but without any success:( The case is that my .bat file in the button bar contains java (anothe one pearl) calling with several parameters inside. It means:
- I can not make direct .bat calling using 'lst2multi' or 'lst2str' as they support only .exe files
- I tried to call java.exe directly with parameters in the /B:"" block but in that case java was not even started. Instead of it file (only one) was opened with associated program for the given extension. Which I saw is a kind of default for /X:"" parameters.
Anyway, thanks for the help! I did not know about these addons. I still hope that they can help me so I keep trying to get them working;)
Br,
Zoltan
Ps. My favourite is Szentendre;)
Hi,
I'll check this lst2run! Thanks for it! The task I'd like to perform is the following:
Now I have an icon configured to toolbar, like:
Command: <filepath>.<filename>.bat
Parameter: %P%N
..
<filename>.bat contains, like:
---
@echo off
java -classpath <class_path> <file_name> <param_1> <param_2> <param_3> %1
pause
---
The prg creates an output file based on the input file data and parameters.
I'd like to configure my TC button in a way that it'd be able to process more than one file in a single drag and drop! (I'd like to get rid of several drag and drop mouse event for several files. I hope it's possible by selecting all the necessary files and make use the icon once..)
Hope I was precise enough!
Br,
Zoltan
I'll check this lst2run! Thanks for it! The task I'd like to perform is the following:
Now I have an icon configured to toolbar, like:
Command: <filepath>.<filename>.bat
Parameter: %P%N
..
<filename>.bat contains, like:
---
@echo off
java -classpath <class_path> <file_name> <param_1> <param_2> <param_3> %1
pause
---
The prg creates an output file based on the input file data and parameters.
I'd like to configure my TC button in a way that it'd be able to process more than one file in a single drag and drop! (I'd like to get rid of several drag and drop mouse event for several files. I hope it's possible by selecting all the necessary files and make use the icon once..)
Hope I was precise enough!
Br,
Zoltan
Then from what I understand you could use lst2run as follows:
You won't even need the batch file.
Cheers.
Code: Select all
-s "-classpath <class_path> <file_name> <param_1> <param_2> <param_3> \"#p\#f.#e\"" -e "_path_\java.exe" -l %L
Cheers.
I hate myself. I hate that I can not leave a problem as it is and wanna solve it anyway.. It will have a long night today.
But as to the topic:
- I checked the parameter you recommended and undertstand its content. Unfortunately, it did not work in may case. And what is even worst I can not debug it.. DOS prompt gets closed immedtiately and I'm not able to catch any response..
- So I tried to run lst2run directly from DOS prompt instead of TC icon. I gave command like:
C:\..\lst2run.exe -s "-classpath <class_path> <file_name> <param_1> <param_2> <param_3> \"#p\#f.#e\"" -e "_path_\java.exe" -l <input_file_path&name>
But I got confused after checking the printout:( It seems that \"#p\#f.#e\ is the file content itself. At least <param 3> is in my case -i meaning that next string should be the input file path&name.extension. But java prg throws an exception that it is not able to open the file. And it gave the problematic string: first row of the input file, second row of the input file, ..
Sorry about my long and maybe confusing mail. I won't be surprised and disappointed withot any reply to it. But at least my anger went away meanwhile;)
Br,
Zoltan
Ps.:
I made a small batch like below and configured an icon in TC
---
@echo off
echo %1
pause
---
How can it be that using it with %L parameter it still gives the filename instead of a temporary lst file name?
But as to the topic:
- I checked the parameter you recommended and undertstand its content. Unfortunately, it did not work in may case. And what is even worst I can not debug it.. DOS prompt gets closed immedtiately and I'm not able to catch any response..
- So I tried to run lst2run directly from DOS prompt instead of TC icon. I gave command like:
C:\..\lst2run.exe -s "-classpath <class_path> <file_name> <param_1> <param_2> <param_3> \"#p\#f.#e\"" -e "_path_\java.exe" -l <input_file_path&name>
But I got confused after checking the printout:( It seems that \"#p\#f.#e\ is the file content itself. At least <param 3> is in my case -i meaning that next string should be the input file path&name.extension. But java prg throws an exception that it is not able to open the file. And it gave the problematic string: first row of the input file, second row of the input file, ..
Sorry about my long and maybe confusing mail. I won't be surprised and disappointed withot any reply to it. But at least my anger went away meanwhile;)
Br,
Zoltan
Ps.:
I made a small batch like below and configured an icon in TC
---
@echo off
echo %1
pause
---
How can it be that using it with %L parameter it still gives the filename instead of a temporary lst file name?
ZoErdei,
Well, what lst2run does is take the filenames from the list file and start the defined program as many times as there are files in the filelist, each time passing the next filename as parameter (\"#p\#f.#e\ is path\filename.ext).
HTH
Roman
Well, what lst2run does is take the filenames from the list file and start the defined program as many times as there are files in the filelist, each time passing the next filename as parameter (\"#p\#f.#e\ is path\filename.ext).
I hope you changed the _path_ part."_path_\java.exe"
HTH
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.
Hi All,
Finally it works OK! All the selected files are processed by java prg. Solution was exactly the one recommended by JackFoo above!
Where I was wrong is the drag and drop.. It is not needed at all! Only required actions are selecting the input files and pressing the defined button. Otherwise %L (or %O %T..) does not mean anything..
(Interesting stuff is that %N still has effect to drag and drop parameter passing..)
Anyway, case is solved so let me thanks for your help with one of my favourite proverb. 'Life is too short to make all the needed miskatakes. Even making them twice!'
Have a nice life!
Br,
Zoltan
Ps: Yes, I'm changing my _path_.. towards my bed;)
Finally it works OK! All the selected files are processed by java prg. Solution was exactly the one recommended by JackFoo above!
Where I was wrong is the drag and drop.. It is not needed at all! Only required actions are selecting the input files and pressing the defined button. Otherwise %L (or %O %T..) does not mean anything..
(Interesting stuff is that %N still has effect to drag and drop parameter passing..)
Anyway, case is solved so let me thanks for your help with one of my favourite proverb. 'Life is too short to make all the needed miskatakes. Even making them twice!'
Have a nice life!
Br,
Zoltan
Ps: Yes, I'm changing my _path_.. towards my bed;)
Re: Drag and drop several files to button bar
I will ask you for a betteer explanation as I have the same issue as you have posted in this tread = selected multiple files are NOT BEING PASSED to the Buttons Bar Command as variables.
Only 1st file is being passed to the command line.
And now the best part: NO PARAMETERS as per HELP for Button Bar are NOT being taken into account, they DO NOT WORK at all.
%L - nothing, %l nothing, etc ....
I'm really desperate as this should be working
Command: C:\Batch\MakeMKV.cmd
Parameters: %L
Dragging multiple files onto the button bar icon creates output
1st param: 1st selected file
2nd-nth param: NOTHING = EMPTY.
Many thanks for any input
And the lst2run - is that some plugin to be imported first and then used as the interpreter between TC and batch file? well why would it work if TC is not able to pass ALL selected files to the command? :-\
Only 1st file is being passed to the command line.
And now the best part: NO PARAMETERS as per HELP for Button Bar are NOT being taken into account, they DO NOT WORK at all.
%L - nothing, %l nothing, etc ....
I'm really desperate as this should be working

Command: C:\Batch\MakeMKV.cmd
Parameters: %L
Dragging multiple files onto the button bar icon creates output
1st param: 1st selected file
2nd-nth param: NOTHING = EMPTY.
Many thanks for any input
And the lst2run - is that some plugin to be imported first and then used as the interpreter between TC and batch file? well why would it work if TC is not able to pass ALL selected files to the command? :-\
|::=- been with TC since 2001 as far as I remember
-=::|

Re: Drag and drop several files to button bar
Sorry but you are not reading the help at all.
%L produces a file in temp which contains a list of selected files.
Of course your batch file would have to read and process this list with a For command.
Alternativ you can install TCBL plugin to handle such a list from a TC button.
It creates and runs a batch for you..
https://totalcmd.net/plugring/TCBL_1.02.html
%L produces a file in temp which contains a list of selected files.
Of course your batch file would have to read and process this list with a For command.
Alternativ you can install TCBL plugin to handle such a list from a TC button.
It creates and runs a batch for you..
https://totalcmd.net/plugring/TCBL_1.02.html
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: Drag and drop several files to button bar
21Rosomak
A button's parameters field become completely irrelevant when dropping files onto that button, or in other words, the parameters are replaced by the dropped files! Parameters like %S, %L and its Unicode counterparts (%WL, %UL) are supposed to be used by selecting objects in TC's file list and simply clicking the button; no drag'n'drop necessary.
Regards
Dalai
A button's parameters field become completely irrelevant when dropping files onto that button, or in other words, the parameters are replaced by the dropped files! Parameters like %S, %L and its Unicode counterparts (%WL, %UL) are supposed to be used by selecting objects in TC's file list and simply clicking the button; no drag'n'drop necessary.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror