-1

I need to extract Attachments from a document to file system (/tmp/) of Domino Server. Domino Server is on Aix 1.6. Method I use :

Set ritem = ParmDoc.GetFirstItem("AttachedFiles")
If ( ritem.Type = RICHTEXT ) Then
    ForAll o In ritem.EmbeddedObjects
        Call o.ExtractFile  ( "/tmp/"  )
        Print "2222     
    End ForAll  
End if

Thrown error :

Agent message: Lotus Notes Error Text= Notes error: Cannot write to a directory. (/tmp/) Lotus Notes Error Code= 4005

This happens even though Lotus Domino user has full permission on that folder.

Note : I can create file in the same directory using

strFname = pstrFullPath + "STAFILENAME"  
expfileNum = FreeFile()
Open strFname For Output As expFileNum
Print #expFileNum , strn
Close expFileNum 

Thank you.

Tode
  • 11,795
  • 18
  • 34
ibotsios
  • 19
  • 2

1 Answers1

1

You literally answer your own question...

I can create file in same directory using...

You try to extract the file "as directory". Just add a filename and it will work as desired:

Call o.ExtractFile  ( "/tmp/" & o.Source  )

From the documentation of "ExtractFile":

Parameters
path$

String. The path and file name where you want to store the extracted file on disk.

Tode
  • 11,795
  • 18
  • 34