Can anyone help with the below?
I am trying to run an agent manually that creates a text file on a server. I will be selecting documents from a view and running this agent, and the document already contains the server name. Is there a way to create a simple text file on that server’s data directory using this agent?
Thanks
Subject: notesstream works too
since agent needs to run i/o, set security permissions on the agent as well. give it appropriate level
Subject: check out Print # statement in designer
Subject: print #
Thanks for the response… but my problem is that I want to create the text file on the server using an action manually. Not running based on a schedule on the server
This code that I have does exactly what I want, but it requires to be ran on the server via schedule or it creates the file locally if ran manually from the agent list
Sub Initialize
Dim fileNum As Integer
Dim fileName As String
fileNum% = FreeFile()
fileName$ = "mail\textfile.Txt"
Open fileName$ For Append As fileNum%
Print #fileNum%, "Line1"
Print #fileNum%, "Line2"
Print #fileNum%, "Line3"
Print #fileNum%, "Line4"
Close fileNum%
End Sub
Subject: just a guess
I did not try this, but it might work…Have your front-end agent trigger another agent using NotesAgent…RunOnServer. That other agent could then produce the text file on the server. It would involve storing the text in some intermediate document, from where the second agent can read it.