Lst2str /ChoiceEditor problem

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Lst2str /ChoiceEditor problem

Post by *raytc »

Hello,

I cannot use any more my Lst2str in combination with ChoiceEditor for more then 1 jpg or gif file.
Error message: unknow file format: cannot read file header
I use Irfanview as image viewer in ChoiceEditor but same message with another image viewer.

I'am not enable as well to see more then 1 pdf file.
Error message: Foxit Reader // usage: FoxitReader [PDF filename] [/n Page Index] /n Page Number
I use Foxit Reader as pdf viewer in ChoiceEditor.

These are my Lst2Str settings:

/X:"C:\Program Files\totalcmd\ChoiceEditor\ChoiceEditor.exe" /L:%L

(same problems with Lst2multi)

I have not change anything so I don't know why I can't see these files with ChoiceEditor.

Thanks in advance for help :)

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

Post by *sqa_wizard »

X:"C:\Program Files\totalcmd\ChoiceEditor\ChoiceEditor.exe" /L:%L
Take in account that the list file (%L) can have blanks in its pathname too !
So quote it as well ...

X:"C:\Program Files\totalcmd\ChoiceEditor\ChoiceEditor.exe" /L:"%L"
#5767 Personal license
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

@squ_wizard,

Still same problems :-(
TC 9.51 (x64) - win10
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

I do not have problems with .doc and .xls files.

Only with .gif /.jpg /.pdf files.

The message opening 2 .gif files =
Can't read file header. Unknow file format.
Clicking on both single files there's no problem.

I've tried with dos command:
c:\program files\irfanview\i_view32.exe d:\1.gif --> works correct
c:\program files\irfanview\i_view32.exe d:\1.gif d:\2.gif --> error message (see above)
User avatar
nsp
Power Member
Power Member
Posts: 1812
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Hi raytc,

I do not know if this can work for you but to open a lot of file at once i use TCBatLnch addon.
I add a button in the TC Toolbar and :
command : C:\<MyPathTo>\TCBLnch.exe
parammeters: %L "C:\<MyPathTo>\choiceeditor.exe" $f

it is done !!!!!
you select any files you want and click the view button it open all files...

I've noticed that if the extension is not known by choiceeditor or the "use alway" stuff is not checked it can work incorrectly. => workarround :
i use a doview.bat where first parameter is extension and second parrameter is the file.
the bat is like :

Code: Select all

@echo off
iif /I %1 == "PDF"  goto DO_PDF

if /I %1 == "GIF"  goto DO_IMAGE
if /I %1 == "JPG"  goto DO_IMAGE
if /I %1 == "BMP"  goto DO_IMAGE
if /I %1 == "TIF"  goto DO_IMAGE

if /I %1 == "TXT"  goto DO_TEXT
if /I %1 == "JAVA" goto DO_TEXT
if /I %1 == "INI"  goto DO_TEXT
if /I %1 == "LOG"  goto DO_TEXT
if /I %1 == "TRC"  goto DO_TEXT

echo unknow extension : %1
pause 
GOTO _END
:DO_PDF
c:\showpdf %2
GOTO _END
:DO_IMAGE
c:\img\irf\i_view %2 
GOTO _END
:DO_TEXT
notepad %2
:_END
And in the parameter i use :
parammeters: %L call DoView.bat $e $f
path: c:\<path_toDoview.bat>


to downolad TCBL : http://www.geocities.com/nospam0123456/forTC
[/code]
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

@nsp,

Thank you for your message.

I did not work for me. :(

My problem is that two of my editors probably doesn't support listfiles,
so you can only open one file at once.

Is it possible to create a RUN command with every file in %L?

like this:
run c:\program_files\irfan\irfanview selected_file_1
run c:\program_files\irfan\irfanview selected_file_2
run c:\program_files\irfan\irfanview selected_file_3
etc
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

This one works with Irfanview:
/X:"C:\Program Files\Irfanview\i_view32.exe" /L:"%L"

This one doesn't work with Irfanview:
/X:"C:\Program Files\totalcmd\ChoiceEditor\ChoiceEditor.exe" /L:"%L" (-->irfanview)
TC 9.51 (x64) - win10
User avatar
nsp
Power Member
Power Member
Posts: 1812
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

raytc wrote:@nsp,

Thank you for your message.

I did not work for me. :(
8<---------- snip snip --------------------

Is it possible to create a RUN command with every file in %L?

like this:
run c:\program_files\irfan\irfanview selected_file_1
run c:\program_files\irfan\irfanview selected_file_2
run c:\program_files\irfan\irfanview selected_file_3
etc
RayTc,

TcBL is building exactly what you need, a bat file with at each line :

Code: Select all

c:\totalcmd\tools\ChoiceEditor.exe "z:\currentfolder\selected_file_1"
c:\totalcmd\tools\ChoiceEditor.exe "z:\currentfolder\selected_file_2" c:\totalcmd\tools\ChoiceEditor.exe "z:\currentfolder\selected_file_3"
...
I've just noticed that choiceeditor has some strange behaviour if the extension is unknown it is for this reason that i use the doview.bat file.
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

@nsp,

I've created this bat file and it works.
However the only problem is that the Bat file waits till I close the first document before to open the 2nd document and so on.
I would like to open all documents together.

Code: Select all

@echo off

IF %1 == "pdf"  GOTO :DO_PDF
IF %1 == "gif"  GOTO :DO_IMAGE
IF %1 == "jpg"  GOTO :DO_IMAGE
IF %1 == "bmp"  GOTO :DO_IMAGE
IF %1 == "tif"  GOTO :DO_IMAGE

GOTO :DO_ELSE

:DO_PDF
C:\progra~1\PDFReader\foxitreader.exe %2
GOTO :END

:DO_IMAGE
c:\progra~1\irfanview\i_view32.exe %2
GOTO :END

:DO_ELSE
C:\progra~1\totalcmd\ChoiceEditor\ChoiceEditor.exe %2
GOTO :END

:END
User avatar
nsp
Power Member
Power Member
Posts: 1812
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

raytc wrote:@nsp,

I've created this bat file and it works.
However the only problem is that the Bat file waits till I close the first document before to open the 2nd document and so on.
I would like to open all documents together.

Code: Select all

@echo off
IF %1 == "pdf"  GOTO :DO_PDF
IF %1 == "gif"  GOTO :DO_IMAGE
8<- - - - - - - - snip snip ---------------
GOTO :END
:DO_ELSE
C:\progra~1\totalcmd\ChoiceEditor\ChoiceEditor.exe %2
:END
modify your batfile in such way :
- add /I to add IgnoreCase for string comparaison (just to be sure than GIF is aso gif ;)
- if you want a nowait launch, use the start command
- to have less cryptic names use quotted string for program names

AND :

Code: Select all

@echo off
IF /I %1 == "pdf"  GOTO :DO_PDF
IF /I %1 == "gif"  GOTO :DO_IMAGE
IF /I %1 == "jpg"  GOTO :DO_IMAGE
IF /I %1 == "bmp"  GOTO :DO_IMAGE
IF /I %1 == "tif"  GOTO :DO_IMAGE
GOTO :DO_ELSE
:DO_PDF
start "C:\Program Files\PDFReader\foxitreader.exe" %2
GOTO :END
:DO_IMAGE
start "C:\Program Files\irfanview\i_view32.exe" %2
GOTO :END
:DO_ELSE
"C:\Program File\totalcmd\ChoiceEditor\ChoiceEditor.exe" %2
:END
hope the old fashon (Bat) way help !
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

Firstly, I would check irfanview docs about multiple files openening at once, I doubt it can't work with multiple files in command line.

That aside lst2multi should work correctly since it calls the program N times once for each file, if it doesn't something in your config of lst2multi is b0rked.

Cheers.
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

JackFoo wrote:Firstly, I would check irfanview docs about multiple files openening at once, I doubt it can't work with multiple files in command line.

That aside lst2multi should work correctly since it calls the program N times once for each file, if it doesn't something in your config of lst2multi is b0rked.

Cheers.
Unfortunately Irfanview doesn't work with Lst2multi together with ChoiceEditor.
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

nsp wrote:
modify your batfile in such way :
- add /I to add IgnoreCase for string comparaison (just to be sure than GIF is aso gif ;)
- if you want a nowait launch, use the start command
- to have less cryptic names use quotted string for program names

Thank you. The bat file does now what I want :D
raytc
Senior Member
Senior Member
Posts: 274
Joined: 2004-06-28, 11:03 UTC

Post by *raytc »

@nsp,

This one doesn't work:

:DO_BAT
start "C:\Windows\notepad.exe" %2
GOTO :END

Do you know why?
TC 9.51 (x64) - win10
Post Reply