Page 1 of 1

Command line options

Posted: Sat Sep 30, 2006 3:05 am
by franknbeans
I was wondering if TextPipe returns some sort of exit code or success/failure codes when ran from the command line. I ask this because I want to be able to write a script that prompts me for the "files to be filtered" location and then proceeds to programmatically or dynamically build my command line
I want to write my script to wait (for the return code) until that task is finished before launching a different filter/command line against the same group of files.

I realize this can be done in a batch (multiple filters) but I do not want the second filter to start unless I am sure the first one was finished successfully or there will be unpredictable results.

Also, I would use this method to do combinations of filtering such as:

filter all files in C:\filterone\*.*
filter all files in C:\filtertwo\*.* (different fll file this time)
merge all outputted files together (yet another fll file)
filter/edit the merged file a certain way, etc (and yet another fll file)


call me lazy but I am looking to further automate some processes I am currently doing with my new TextPipe Pro

Posted: Sat Sep 30, 2006 12:04 pm
by DataMystic Support
From the help file under Advanced\Exit codes.

TextPipe sets an exit code on completion that depends on the level of errors logged. Exit codes are useful for detecting program success from command line execution. You can use the DOS ERRORLEVEL command in a batch file to modify the execution flow according the exit code.
Highest logged error
Exit code

e.g. in a .BAT batch file.
textpipe.exe ....
IF ERRORLEVEL 3 do_something
IF ERRORLEVEL 2 do_something
IF ERRORLEVEL 1 do_something

Posted: Sun Oct 01, 2006 11:27 am
by franknbeans
I need to go back and re-read the chm file, must have overlooked that part - thanks