0
votes

I am using a script ( created in lotusscript ) and I want to get the path of a file. Is there a solution in lotusscript for command @FileDir?

Thanks!

2

2 Answers

2
votes

There is no exact command, but this should solve it.

Dim x as String
x = StrLeftBack("c:\notes\data\test.nsf", "\")
print x

More details on the command here:

http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/LSAZ_STRLEFTBACK.html

To get just the filename.

Const filename = "c:\notes\data\test.nsf"

Dim x as String
x = StrLeftBack(filename, "\")
if x <> "" then x = StrRight(filename,x + "\")
print x
1
votes

I posted some code last year to do file operations, including extracting path name. http://blog.texasswede.com/code-expanded-class-for-file-functions/