I’d like to create a schedule agent, which should be able to grab and read files located on the same server, where the database resides.
If the agent is not scheduled and I deal with my local computer, then this code works fine:
pathname = “c:\temp\test\file.txt”
However I am trying to run the same agent on the server indicating “temp\test\file.txt” and it couldn’t find the file.
Is the path is wrong? What is supposed to be there in the case of server?
Thanks!
Subject: Read a file on server?
The ID that signs the agent must be able to run Unrestricted Agents, this is probably why it will not run. But, also if the agent is running on a server C:\ may not be valid.
Subject: Read a file on server?
Are you looking for the file in a ‘temp’ folder which is a sub-folder of the Domino data folder?
Your agent could get the ‘Directory’ setting from the Notes.ini file (by using the GetEnvironmentString method of NotesSession) and then appending your ‘temp’ path to it thereby making the temp path a sub-folder of the Domino data directory. This would make the code a little more portable.
Alex