Write files to a mapped drive?

In a clustered Domino environment, I need to use an agent (lotusscript or java) to detach file attachments to both servers’ file systems. I get Error Opening file messages.The drive is mapped on the server where I am testing the agent.I can read/write from the Command prompt window. I’ve tried running Domino as a service as well as not. I and the agent have unrestricted access.

Any ideas? Has anyone done this sort of thing so I know that it is possible?

Thanks!

Subject: Write files to a mapped drive?

Post the code.It will be easier to debug.

Subject: RE: Write files to a mapped drive?

Here are the relevant code snippets…Everything works until doing the second fileOpen. I never see the message “deleting from the other computer 2”

It looks like a configuration issue to me, rather than a code problem, but any advice is appreciated.

Thanks for looking at this.

Dim driveLetter As String

driveLetter = Left$(session.GetEnvironmentString("Directory", True),2)



HomeDir = driveLetter +"\data\notesw32\domino\html\" + directory + "\" + subdirectory

HomeDir2 = "g:" +"\data\notesw32\domino\html\" + directory + "\" + subdirectory



Dim OutputFileName As String

Dim OutputFileName2 As String

Dim FileNumber As Integer

OutputFileName = HomeDir + "\" + doc.fileS1TX(0)

OutputFileName2 = HomeDir2 + "\" + doc.fileS1TX(0)

Set attachment = doc.GetAttachment( doc.fileS1TX(0) )

	dbug.logaction("deleting from this computer")

	FileNumber = Freefile()

	Open OutputFileName For Output Lock Read Write As FileNumber

’ Print #FileNumber, “delete this guy”

	Close FileNumber

	Kill OutputFileName

	If doc.statusTX(0) = "Published" Then

		attachment.extractfile(OutputFileName)

	End If

	' output to second server

	dbug.logaction("deleting from the other computer")

	FileNumber = Freefile()

	dbug.logaction("opening for output other computer ")

	dbug.logaction(OutputFileName2)

	Open OutputFileName2 For Output Lock Read Write As FileNumber

	dbug.logaction("deleting from the other computer 2")

’ Print #FileNumber, “delete this guy”

	Close FileNumber

	Kill OutputFileName2

	dbug.logaction("extracting to the other computer")

	If doc.statusTX(0) = "Published" Then

		attachment.extractfile(OutputFileName2)

	End If

	dbug.logaction("got this far")

Subject: Write files to a mapped drive?

Hi,

I have seen that problem before but I did not solve it myself.

All I can say is that mapped drive is defined on your Domino server for the admin user (or another user) but not for System.

On Windows 2000 you have to assign the Domino service to a user that has this drive mapped.