I am trying detach a file from a notes document into Disk with a path where Path + file name length is >255 but file name length is less than 100 characters , Domino generates Error “File cannot be created” .
But it works fine when the Path + file name is <255 characters.
Windows OS filename length limitation is 255 characters.
Notes should check the length of the filename for 255 characters, instead it checks the length of Path + filename, thats why I am getting the error.
Anybody knows how to overcome this problem ?
Example :
C:/temp/Acme/1. BASIC INFORMATION AND BACKGROUND/1.1 Organizational chart showing all active subsidiaries, partnership and joint venture entities, identifying corporate parent and percentage ownership./Bebit correspondence TK Limited123451234512345123.pdf
Subject: ExtractFile method Path$ length >255 characters Error
i found that the method Extractfile also generates the ‘file cannot be created’ error on spaces in the filename…
Subject: It’s the way the APIs work
The APIs for extracting attachments want a full path to the target filename, not a filename and path as separate components, thus the problem that you are seeing.
Have a look at
STATUS LNPUBLIC MailExtractMessageAttachment(HANDLE hMessage,BLOCKID bhItem,char far *FileName);
and
STATUS LNPUBLIC NSFNoteExtractFile(NOTEHANDLE note_handle,BLOCKID item_blockid,const char far file_name,ENCRYPTION_KEY far *DecryptionKey);
in the API reference guide.
On the plus side, you can extract an attachment with any name you want, as the attachment “source” is a BLOCKID. I use this a lot for renaming on-the-fly.
Subject: Well…
the obvious way to overcome this problem is to use shorter path names 
Thomas - IBM