List of files in server's mail directory

I need help with an agent that do the following

Access the mail directory in my server and make a .text file that opens automatically when the agent done

This text file is presenting a list of the mail files we have in our mail server.

Sub Initialize()

’ List the contents of the c:\ directory, one entry per line.

Dim pathName As String, fileName As String

pathName$ = “C:\IBM\Lotus\Notes\Data\mail*.*” 'I want my directory path on server

fileName$ = Dir$(pathName$, 0)

Do While fileName$ <> “”

Dim m As Integer

Print fileName$

fileName$ = Dir$()

Loop

’ I need to open a text file with a list of the output.

End Sub

this code works in my local file system but I need to write a path with my server name and path to mail folder

I want a list with all .nsf files in mail directory on my server (servername/mname/org)

I want to print the result as a list on a text file that opens when the agent is done.

Subject: could using the “load convert -l ” work?

Another option is that you could write a program doc to generate the text file on a schedule and then create a button to open the filename on demand in some application or from the catalog possibly?http://www-01.ibm.com/support/docview.wss?uid=swg21304939

Subject: use UNC path

pathName$ = “\hostname\Lotus\Domino\Data\mail*.*”