Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I print the absolute path from the relative path in the document?
e.g. If I have source text files in, LET vFilePath=..\..\..\IMS\Source\*.txt
Then I need to print the absolute path of my source file directory.
Is this what you're looking for?
filepath()
Returns a string containing the full path to the table file currently being read.
Example:
Load *, filepath( ) as X from
C:\UserFiles\abc.txt
Will return 'C:\UserFiles\abc.txt' in field X in each record read.
replace text in bold with your file
LET vFilePath='.\tmp\S.qvd';
load distinct FileDir() as MyFile FROM $(vFilePath) (qvd);
LET vFullFileDir = peek('MyFile');
TRACE $(vFullFileDir);
RESULT
Characters << AUTOGENERATE(26) 26 lines fetched
ASCII << AUTOGENERATE(255) 191 lines fetched
Transactions << AUTOGENERATE(1000) 2.011 lines fetched
S 19 lines fetched
C:\Users\mgrossi\Desktop\tmp