Florin M.
Florin M.

Reputation: 2169

Lotus Notes - @FileDir command

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!

Upvotes: 0

Views: 426

Answers (2)

Karl-Henry Martinsson
Karl-Henry Martinsson

Reputation: 2795

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

Upvotes: 1

Simon O'Doherty
Simon O'Doherty

Reputation: 9349

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

Upvotes: 2

Related Questions