I was wondering if there is a way to write a file to the server relative to the Data folder without using a drive letter…
Instead of “E:\Lotus\Domino\Data\NewFolder” I would want to use “\NewFolder” as the fileImport variable…
fileImport = “\NewFolder”
fileName = “\fileName.txt”
checkDir = Dir$(fileImport, 16)
If Len(checkDir) = 0 Then
'Let’s create the directory…
Mkdir fileImport
End If
Is this possible?
Thanks!
Dan
Subject: Write File to server relative to Data Folder without drive letter
-
You should be able to use “NewFolder” (no slash), and it will be relative to the Data directory automagically, as long as you haven’t run any other code that changed the current directory for LotusScript.- Or it may be Notes is the default. I keep forgetting. (drool) In that case “Data\NewFolder” should work. (shrug)
-
Either way, the big thing I hit is that if I change the current directory on one Agent, it will remain changed until I restart the server, or the client, or change it back with more code. It doesn’t seem to apply to Notes itself … only user code.
-
Hope this helps…
Subject: RE: Write File to server relative to Data Folder without drive letter
Don’t start with a ; that refers to the root of the file system.It’s probably not safe to assume that the Notes data directory or the Notes program directory is the current directory.
See curdir function.
Why would you not want to use the full pathname? Use the Directory environment variable to find out the data directory’s path.
Subject: RE: Write File to server relative to Data Folder without drive letter
That makes sense now…
Will try the Directory environment variable…
Thanks!
Dan