## New lst2str (v1.11)

English support forum

Moderators: sheep, Hacker, Stefan2, white

JackFoo
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

### New lst2str (v1.11)

Hi, this is a new version of lst2str, the only difference from v1.10 is the [file] parameter; it's now passed last (after the list file contents). I'm posting it here in XXE (I'll pass it to Maxwish and Ergo and perhaps they will post it on their sites):

P.S. Don't forget to remove trailing spaces after you copy the text.
P.S.P.S. If someone is bothered by the big chunk of text I posted, please say so.

Cheers.

Code: Select all

begin 644 lst2str.rar
hIa3m6Fc5+1jEQkU+1E+++++++++gEbG+U0c+3UE++9o7+++0CbYlc5iUOWsR
hBEc+6++++57ZMKFhNGtoS5GyTqk779lJcRKIbPFx6KCTtv9tEmTci-oWKHkE
hy7b3N2nUaki6gCq88QnVONcDFk06tSdkaLrwIWKcP9zJrZRbz7sfGdwMnSpJ
hwrJDSr2G1qTOaPoGBRPxHSpEcBEDLC40vMv6fcl5nQfkfImBzukAmEyNg2dF
hpGrh6Dq3-daCzoXRgcgLCRXPicdmz5PeFBetIFKLnDuSmUyGR1O+9oYwhHGR
hLKf0CN5vxPfWDV2atQUIwZCWUzQSmlWZVX5ggoBDYVjhd1J5mX4MTk2na9tV
hFLqin3oJPZ3PahrZJD9YJyj0ZNfGZIW8-YePoQxt7V8TxXGgGiBh1GcjuL6i
h5Gu7YfwHws7w6XsT6RxR-v9WCUncCY2TeRd-uIETOsqv2d7QhNV9rSkdNTBV
h7Pt5qlQFJ66Os9BPfAYur+nyyAzzSY0dUke+gUghzcSy6fBGj26mDlkePo81
hh9-ScsJJf24RTNcag7Aj9dELPXveWFrdrR4h6acJEu6Sp8b1yhdbQB33ICrG
hcStve+glHHerm6nuf8TH5JL6jRioycrrcdhuLHn8pagSaAOjcNgGOv4KFqUo
hAxIXSe+tFCWCda5sOZ2NjDmg6pdSHhQO3OLhY8fw01WoDEvYkP-naLrPaiD3
hIilYNwxPhn16D2+Xc6oK6GyfH9ZbSYa7NoBJfXfOWiO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3-j3F
hCSQCIbAfipC0uonhfw6185W6k1aSW3Gt9GigyAJWKTjjUZZ7i6UG1SfqtLAm
X8rebSSa13tF-zs2Y1WF2-9lW8U++jsVbxebzpAExSk-+-k++
+
end
sum -r/size 20276/4130


Valentino
Power Member
Posts: 693
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine
Thanks a lot!
Going to test...

Valentino
Power Member
Posts: 693
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine
JackFoo
It doesn't work when two files are selected in source pane and "/N:2" switch is specified. It's me who directed you in the wrong way :
Valentino wrote:Of course, if there's /N parameter you should take from the list n-1 files if /F is specified.
I was wrong, sorry. I don't know what I was thinking about...
Of course I can remove "/N:2" from my config to solve this but IMHO you should change this lst2str's behaviour (list file should be passed first, /F should be passed only if /N allows it).

BTW, you can freely call CreateProcess in console applications (include "windows.h" for this), so you can make one more my dream true (about maximization) .

Thanks for your work. I think not only I is intrested in this.

There is one more "inconvenience": TC's native file comparator always opens left file in left pane and right file in right pane, disregardless of where a source pane is and where is target. But I don't know how to solve it...

Maxwish
Senior Member
Posts: 370
Joined: 2003-02-05, 19:13 UTC
Location: .NL

...BRB...

JackFoo
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR
As I said before, the problem is in TC or rather the usage of %T%M. Notice that TC remembers which file was under your cursor when you [tab] to a different window so it passes this [remembered] file as %T%M, there isn't much you can do about it.
Perhaps it's a feature to ask of Christian i.e. to add a kind of %TL [target list file] etc. such that it won't pass anything if (nothing is selected or WAS under focus).

For example (pseudo code):

PASS:
if( TPANE_SELECTION )
PASS TPANE_SELECTION

if( SPANE_SELECTION )
PASS SPANE_SELECTION
else if( SPANE_FOCUS )
PASS SPANE_FOCUS

(*) Note that there is no TPANE_FOCUS because once you have a file under focus this pane becomes the source pane.

Your suggestion won't help because if you have /N:2 and select 2 files in the source pane while having another marked in the target pane I won't be able to know which to select and every solution would be an ugly unintuitive fix.
As for [windows.h], I'll check it out.

za222
Member
Posts: 144
Joined: 2003-03-11, 17:19 UTC
Location: Germany
the readme.txt sais: "Warning: If the list file will contains more than ~250 chars the program will exit without an action"

Normally I'm creating mp3s ripped from my cds with lame.exe by command line.
I would like to it directly with Total Commander and lst2str.
But my mp3s are in e:\Musik\My_Albums\%Atrist% - %Title%\%Nr% - %Title% and so the list is almost always longer than 250 chars.

is there a possibility to have more than 250 chars?

Black Dog
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:
[face=courier]On 11-03-2003 19:32:42 +0000 za222 wrote:

z> is there a possibility to have more than 250 chars?

It was made for compatibility with 9x 'case MD do not understand CL length more than 256 (or 255?) symbols. And AFAIK this utility treat all the file names passed as application command line parameters. But actually it's time to say "good bye" to MD, don't you think, JackFoo? And AFAIK NT maximum CL length is at least more than 6000 symbols - actually this parameter is undocumented, so it can be just unlimited...
BTW, try List To MultiInstance by Tir Na Nog.[/face]

Valentino
Power Member
Posts: 693
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine
2JackFoo
Sorry but seems that you didn't uderstand me right. As I already wrote before I don't see anything wrong in current TC behaviour (please read my previous post if you want to know why I think so). The problem is that you take 1 file from /L and 1 file from /F wheras the list contains 2 files. I think you should take files from list because as you wrote in readme /L takes precedence of /F. It's just small bug.
Just in case I give an example. I have the follwing config:

Command: c:\path\to\lst2str.exe
Parameters: /X:"c:\path\to\ncompare.exe" /L:%L /F:%T%M /N:2

I select two files in source pane and click this button. According to lst2str's readme.txt you should first take files from /L and then from /F. List contains 2 files so you should pass them and stop. /F should be ignored. You should take /F only when /N was bigger or omitted, or when list contained 1 file.

Correct me if I'm wrong. I'm open to any discussion.

Oh, and what do you think about this? Maybe it's better to foresee all probable usages and cover them now?
JackFoo wrote:As for [windows.h], I'll check it out.
Thanks. If you have any difficulties with this, you may freely contact me... wanted to say by PM but it's not available ... contact here then.

JackFoo
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR
Howdy, thanks for all the responses, the following things are currently planned to be changed in the next release (soon, this week, maybe):

1. At last to Valentino's request, there will be a switch to define window state (MAX, MIN, HIDE, DEFAULT);
2. The whole shebang with the /L, /F will work like this:
/L will take priority over /F (regarding the /N) i.e. if there are 3 selected files in the source pane and another in the target while /N:3 -> only the 3 files from the source pane will be used.
3. About the command line length I'm not sure, I haven't limited it to 255 only becasue of 16bit apps but mainly due to some programs, for instance winamp cannot handle longer CL's, winamp just chokes and throws out a nasty mem. exception... So @za222 your two options are call Nullsoft (goodluck) or use the lst2multi as BD suggested (it won't help if a single parameter is this long), did you try using %l (lowercase) this should pass the names in 8.3 format which in your case should help.

Cheers.

Valentino
Power Member
Posts: 693
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine
2JackFoo
Thank you and sorry if I had bothered you...

Valentino
Power Member
Posts: 693
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine
... but I have one more "wish" to make lst2str+ncompare work closer to TC's built-in file compare tool (TCC for short):

If I select some file in source pane and don't select nothing in target pane and activate TCC, TCC looks for target file with the same name as the source file. To implement smth similar with lst2str+ncompare I propose the following:

I place cursor (in target pane) on [..] entry. In this case %T%M will be target dir (with slash at the end). And I thought that lst2str could search for a file in this dir with source file name. Yes, this case is very special and it's not very correct to implement such a very specialized behaviour in a tool that should somehow generalize its capabilities for wide range of users. Hope you understand what I mean because my english explanation looks clumsy.

But nevertheless I don't see how to do it other way (except writing own tool). Probably this will be useful for someone else. So, if you decide to "help" me and make me happy with this it can be made as some switch (because someone may need dirs to be passed unchanged).
For example:
/Z - replace if possible a passed dir with a file from this dir with the name of other passed file. Warning: works only if two parameters are passed, one of them being file and other being folder.
or probably make switch /Z:"file" in addition to /F:"file". If /F:"file" is used don't change the "file". If /Z:"file" is used and "file" is actually a dir (slash at the end) try to replace dir with a file.

JackFoo
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR
Hi all, I'm currently beta testing the new version, and the following is an excerpt of the readme, have a look and tell me what you think. @Valentino I thought about the empty dir and I don't find it _that_ important to add, sorry.

Cheers.

Code: Select all

Changes v1.15:
[+] Added a new switch /W (controlls window state).
[+] Added a new switch /C (command line length limit).
[?] Changed the way executables are called (to CreateProcess).
[?] Changed the priorities of /F, /L.

1. Usage:
lst2str /X:[program.exe] /L:[listfile] /F:[file] /N:[nnn] /W:[state] /C:[nnn] /S:[switches]

/X:[program.exe] : Program name you would like to run. (NOT optional)
/L:[listfile   ] : The list file. (NOT optional)
/F:[file       ] : An added file, it will be passed last, and only if /N allows it {a fix for TCmd target pane file}. (default: NONE)
/N:[nnn        ] : An integer specifying the maximum number of files to pass, such as ncompare or examdiff. (default: "INFINITE")
/W:[state      ] : One of the following {M, m, H} where [M] is maximized, [m] minimized and [H] hidden. (default: will open the program in it's default state)
/C:[nnn        ] : An integer specifying the limit for command line length, can be in the following range [256-4096]. (default: 256)
/S:[switches   ] : Switches to pass to the program BEFORE the contents of [listfile] and the [file]. (default: NONE)


Valentino
Power Member
Posts: 693
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine
JackFoo wrote:I thought about the empty dir and I don't find it _that_ important to add, sorry.
Never mind.

robinsiebler
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

### Confused!

WTF!?!

I read all of this and I am a bit confused. This is the command I am passing to lst2str: /X:"c:\Program Files\ExamDiff\ExamDiff.exe" /L:"%L". It works fine if both files I select are in the same pane. However, if one file is in one pane and the other in the other, this doesn't work. What command do I need to pass?
Robin L. Siebler
------------------------------
"Bother", said Pooh, as he deleted Windows

lzvk25
Member
Posts: 182
Joined: 2003-02-09, 04:28 UTC
Location: Collierville, TN
2robinsiebler :

These are the parameters I am using :
/X:"C:\Program Files\ExamDiff Pro\ExamDiff.exe" /L:%L /F:%T%M /N:2 /C:4096

This way both files are passed, just keep in mind that the first file you select, will be on the right pane of ExamDiff, regardless of the position in TC, so, in the worst case scenario, just do a "Toggle Files" in ExamDiff.
8)
Memo to Boss : No TC, No Work