Specifying a relative output path?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Specifying a relative output path?

Postby DFH » Tue Jan 31, 2012 1:24 am

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

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

Re: Specifying a relative output path?

Postby DataMystic Support » Tue Jan 31, 2012 4:24 pm

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?
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

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Specifying a relative output path?

Postby DFH » Wed Feb 01, 2012 1:13 am

@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

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

Re: Specifying a relative output path?

Postby DataMystic Support » Wed Feb 01, 2012 11:10 am

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?
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

DFH
Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Specifying a relative output path?

Postby DFH » Fri Feb 03, 2012 9:53 pm

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

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

Re: Specifying a relative output path?

Postby DataMystic Support » Sat Feb 04, 2012 9:20 am

Ok, this change is in, ready for the next release.
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


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

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests