Page 1 of 1

Specifying a relative output path?

Posted: Tue Jan 31, 2012 1:24 am
by dfhtextpipe
Suppose I do not wish to change the file extension, but do wish to create a new subdirectory for the output files.

Currently, if one uses the dot notation, the output path is relative to where the TextPipe filter is stored. This is not what is required.

How can one program the output path to be relative to the path where the input file is located?
There is no environment value for the input path minus the filename, is there?

And think in general terms, such as when the required filter has been added to the Windows Shell extensions,
so that in theory the input files could be anywhere on the file system.

David

Re: Specifying a relative output path?

Posted: Tue Jan 31, 2012 4:24 pm
by DataMystic Support
Hi David,

I think the issue here is consistency - paths need to behave the same throughout.

We have @INPUTFILENAME and @FULLINPUTFILENAME, so why not @INPUTPATH, which would vary with each input file?

Re: Specifying a relative output path?

Posted: Wed Feb 01, 2012 1:13 am
by dfhtextpipe
@INPUTPATH would be a sensible solution using a global variable.

It's a wonder that you'd not thought of this a long time ago. :wink:

Maybe you did, but it's absent from the table in the help page titled Macros and Global Variables.

David

Re: Specifying a relative output path?

Posted: Wed Feb 01, 2012 11:10 am
by DataMystic Support
Hi David,

Although I've just added it, I see a stumbling block. The Output Filter fields do not allow macros in these fields (output folder, output extension, single output filename). And in the case of single output filename, this filename is set at the start of the job, before any files are open. The output folder and output extension are easier.

Currently, TextPipe replaces any environment variables in these fields at the start of the job, and then uses the resulting string for the remainder of the job.

So the change to allow macros would be to defer resolution of the environment variables and macros until the time of actual use. I am looking into this now.

BTW - do you take data from a number of different input folders, and expect each input folder to get a new '\output' subfolder?

Re: Specifying a relative output path?

Posted: Fri Feb 03, 2012 9:53 pm
by dfhtextpipe
Hi Simon,
BTW - do you take data from a number of different input folders, and expect each input folder to get a new '\output' subfolder?
Many of my filters operate on files from a single folder, but a few operate on files from more than one.

However, I'm rather more concerned with making it easier to use a relative path when I call a filter from the Windows Shell extensions.
In these cases, I usually only select a single file, or (in rarer circumstances) a single folder.

David

Re: Specifying a relative output path?

Posted: Sat Feb 04, 2012 9:20 am
by DataMystic Support
Ok, this change is in, ready for the next release.