/* Get a document's path */
Options Results
DocName
If RC > 0 Then Do
Request1 'Could not get document name.'
Exit
End
dname = Result
Address Command 'CD >T:docpath'
Address 'REXX'
If Open('pathfile', 'T:docpath', 'R') Then Do
docpath = ReadLn('pathfile')
Close('pathfile')
Address Command 'Delete >NIL: T:docpath'
If Right(docpath, 1) ~= ':' Then
docpath = docpath||'/'
docpath = docpath||dname
Address
Request1 'The path to this document is'||'0A'X||'"'docpath'".'
End; Else Do
Address
Request1 'Could not get path.'
End
—————————————————————-
Just issue the current document before running this macro.
I hope this helps for now.
Mark Thomas
New Horizons Software, Inc.
I was asking about getting the path. Sounds like this will work, though
there's an easier way to get the current directory:
docpath = pragma('d')
Thanks for the information, I'll definitely put it to use.
Peter