Specifying a relative output path?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Specifying a relative output path?

Post 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
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Specifying a relative output path?

Post 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?
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Specifying a relative output path?

Post 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
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Specifying a relative output path?

Post 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?
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Specifying a relative output path?

Post 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
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Specifying a relative output path?

Post by DataMystic Support »

Ok, this change is in, ready for the next release.
Post Reply