Page 1 of 1

Need path only

Posted: Wed Oct 03, 2007 11:47 pm
by othni
I need to capture the path for the file being processed in my output file.

So I did this:

One filter uses the @FullInputFilename macro to first add the whole thing to the beginning of the line.

The next filter is a Search/Replace that looks for @inputfilename and replaces that with NOTHING.

But this last filter is not working.

What I am trying to do is end up only with the PATH portion of it.

Is there a macro specifically for this? Why it is not working? Is there another way to do this?

Thank you

Posted: Mon Oct 08, 2007 8:42 am
by DataMystic Support
It's not working because @inputFilename and other macros can't be used in the search string (for efficiency reasons).

Why not add @FullInputFilename with a \t or comma after it at the beginning of the line, then use a search/replace pattern restricted to the first tab or CSV field to remove everything after the last '\' up to the end of the field?