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
Specifying a relative output path?
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Specifying a relative output path?
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?
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?
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: Specifying a relative output path?
@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.
Maybe you did, but it's absent from the table in the help page titled Macros and Global Variables.
David
It's a wonder that you'd not thought of this a long time ago.
Maybe you did, but it's absent from the table in the help page titled Macros and Global Variables.
David
David
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Specifying a relative output path?
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?
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?
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: Specifying a relative output path?
Hi Simon,
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
Many of my filters operate on files from a single folder, but a few operate on files from more than one.BTW - do you take data from a number of different input folders, and expect each input folder to get a new '\output' subfolder?
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
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Specifying a relative output path?
Ok, this change is in, ready for the next release.