Command line options

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

franknbeans
Posts: 17
Joined: Wed Aug 30, 2006 1:26 am

Command line options

Postby franknbeans » Sat Sep 30, 2006 3:05 am

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
-then,
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\*.*
(wait)
filter all files in C:\filtertwo\*.* (different fll file this time)
(wait)
merge all outputted files together (yet another fll file)
(wait)
filter/edit the merged file a certain way, etc (and yet another fll file)

etc.....

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

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Sat Sep 30, 2006 12:04 pm

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
None
0
Info
1
Warning
2
Error
3

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

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

franknbeans
Posts: 17
Joined: Wed Aug 30, 2006 1:26 am

Postby franknbeans » Sun Oct 01, 2006 11:27 am

I need to go back and re-read the chm file, must have overlooked that part - thanks


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 2 guests