Page 1 of 1

Secondary Output Filter

Posted: Tue Nov 18, 2008 11:45 am
by tahoar
Currently, I'm using a "Restrict To|Secondary Output|Delete All" comination to branch and send text to an another file, but I want to assign the filename during runtime.

I've tried using two "/mergefile=" switches from a command line and it didn't work. I've also tried using @datetime global variable in the single file output field and that didn't work.

Is it possible to assign a "Single File Output" value to a Secondary Output Filter during runtime or from a command line switch?

The only other option I can think of is to discard the secondary output filter and create a VB Script that sends the output to a file. Would this work from within a Restrict To branch?

Thanks,
Tom

Re: Secondary Output Filter

Posted: Thu Nov 20, 2008 6:24 am
by DataMystic Support
Hi Tom,

There are plenty of things you can't do from the command line.

In this case, use File\Export to export the filter to VBScript or JScript, and modify the filename there.

Also, you can't use variables in filenames, although it is a good idea.

Re: Secondary Output Filter

Posted: Fri Nov 21, 2008 11:59 pm
by tahoar
Thanks for the confirmation. I figured this was the case.

I know command line is limited, but suites 99% of my functionality. I've come up with a way to do what i want.
1) set an environment Variable form the batch command line before starting textpipe.exe
2) use restrict-to to branch isolate desired lines.
3) End the branch with a vbscript filter that reads the environment variable and global variable of the input file/path. It then calculates the appropriate output filename and uses WHS fso to output the lines.

It gives me the functionality I need with a batch file/command line interface.

Thanks again.
Tom

Re: Secondary Output Filter

Posted: Mon Nov 24, 2008 3:09 pm
by DataMystic Support
Thanks Tom,

You can also use a subfilter of the vbscript filter with a Special\Secondary Output filter to send output to a whole new file. It might remove the need for a FileSystemObject.