Hi, this a perliminary release aka (alpha) version, it should be stable despite being alpha i.e. non mem-leaks or major bugs; There are however many missing features that are planned.
Try it if you like, and I'll be happy to hear feadback i.e. bugs or features you would like to see.
lst2run v0.1 (alpha).
USAGE:
lst2run [-e [exe]] [-s [expression]] [-l [list.file]]
Runs the specified [exe] on every file in [list.file] with command derived
from the expression.
-h Prints this screen.
exe The executable to run, can be any valid runnable file.
expression Expression to be used as the command for [exe],containing
valid placeholders.
list.file A file containig a list of files to be run on.
Currently valid placeholders are [#f] file name, [#p] path, [#e] extension
Given a file [c:\somedir\di1\my file.ornot]
#p = [c:\somedir\dir1]
#f = [my file]
#e = [ornot]
Example of usage with TC:
Command : C:\path\lst2run.exe
Parameters: -s "a #f.rar \"#p\#f.#e\"" -e "C:\path\rar.exe" -l %L
Will call rar to archive for every file in the list one by one.
* Note the \" before #p, this is needed to put quotes when the file/command
might contain spaces.
Ok this is the file in base64 (remove trailing spaces), if you're having trouble getting it, post your email and I'll mail it to you; (it won't be on Maxwish's site till it becomes release)
Ok, I can there is lots of interest in this tool, heh. Either way, currently worked on feature is a [#c] placeholder; it's a counter defined as follows:
#c [start from]:[f1][f2]:[op1]:[op2]:[padding]
[start from] - [number] the number to start from (default = 1)
[f1][f2] - [char][char] can be one char or two, this also defines the number
of operands, one/two of the following can be used
+,-,*,/,^ (plus, minus, multiply, devide, modulo) (default = +)
[op1] - [number] the first operand, on which the first function is used (default = 1)
[op2] - [number] must be if [f2] was specified, mustn't be if it wasn't
[padding] - [number 1-10] specifies the padding to be used with the result (default = 1 (no padding))
example:
#c - would result in counter to start from 1 and be incremented by one for each file
#c 5:+^:1:2:2 - would result in the following series: 05, 00, 01, 00, 01, 00 ... aka:
a(1) = 5, a(N) = (a(N - 1) + 1) modulo 2; and pad to 2;
Hey,
I always get "Bad command or file name" using lst2run and something like:
Command: C:\path\lst2run.exe
Parameters: -e "c:\Programy\Xnview\nconvert.exe" -s "-out jp2 \"#p\#f.#e\"" -l %L
I tried others programs, too, always Bad command or file name. W98SE.
TIA
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.
I actually think the problem is somewhere in the code used to run the program (CreateProcess?), because the exe isn't found even when using just -s "#f". So either it's a bug in the code of lst2run or in my -e "c:\Programy\Xnview\nconvert.exe" and the other exes I tried.
But thank you for your answer nevertheless.
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.
I don't know the syntax for XnView, but may the filename must be the first entry like
I am afraid I did not explain myself clearly. The EXE itself isn't found. No matter what program I try to run I get the message "Bad command or file name." If the problem was in -s then nconvert would complain about bad parameters. If it was in %L then I wouldn't get "Bad command or file name" two times (if there are two files in the list).
Thanks for your help, but I think it's either something in lst2run's code, something about me using W98SE or just some stupid mistake.
Thanks
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,
I'm sorry for not answering before I've been away for a while, and am now swamped by work and studies, as if whole hell broke loose...
Any ways, I've tried your exact command line and it works here perfectly,
Parameters:-e "C:\Program Files\XnView\nconvert.exe" -s "-out jp2 \"#p\#f.#e\"" -l %L
the only change I made is the exe path, make sure it's correct, if that doesn't work than it must be something to do with win98; though I used only ANSI C and I for now use system() call rather than CreateProccess.
BTW, Program[y] is that an English _y_ or maybe other charset, I know a bit of Russion so I was thinking it might be a different charset which might b0rk the system() call.
Program[y] is that an English _y_ or maybe other charset
It's a totally normal y. The problem occurs with any exe I tried. I still think it must be something in the way you call the program. How about old WinExec for debugging?
sqa_wizard,
To workaround this, you may use the old 8.3 notation.
The whole path including filename is 8.3 (as can be seen in my previous posts).
I hope "C:\path\lst2run.exe" is not the real used expression ...
Is there anything that contains spaces and have to be quoted ?
The expression is "c:\Programy\Totalcmd\lst2run\lst2run.exe". There is nothing that would need to be quoted. If TC wouldn't be able to find lst2run I would get a messagebox reading 'File not found!", however, I get two "Bad command or file name"s - one for each selected file.
Hi Roman,
regrettably I have no win98 for now, I'll try finding one for test, in the meantime I've made a "debug" version, it'll write a log file [lst2run.log] that contains every line the program executes. So you'll end up with a list of commands, try running those manually and fiddle with them, it seems there is some inconsistency between the ways OS's parse quotes...