CompuServe Thread

Doc's path (cont.)

3 messages in this thread
#36948From: New Horizons SoftwareMar 14, 1992 6:41 PM
/* 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.
#37042From: Peter SmithemMar 16, 1992 9:31 PM
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
#37075From: New Horizons SoftwareMar 17, 1992 7:58 AM
Peter, Hehe, well I haven't looked at the pragma function. Thank you. Mark Thomas New Horizons Software, Inc.