"The File Exists" Error Message When You Upload Files by Using the Om_Sample Code Sample from the SharePoint Portal Server SDK (323622)



The information in this article applies to:

  • Microsoft SharePoint Portal Server 2001

This article was previously published under Q323622

SYMPTOMS

When you use the Om_sample code sample that is included in the SharePoint Portal Server Software Development Kit (SDK) to upload documents to the portal, you may receive the following error message:
-2147024816 (CreateDocument)

The file exists
You receive the error message when you run the following line of code:
oDoc.DataSource.saveTo sHref, , ,adCreateOverwrite, ,Ulogin, uPass

CAUSE

This issue may occur if the %SystemRoot%\Temp folder on the server contains more than 65,535 files. Each time you upload a file to the portal by using the code sample, a temporary file is created in the %SystemRoot%\Temp folder. The maximum number of files that the %SystemRoot%\Temp folder can contain is 65,535 files.

WORKAROUND

To work around this issue, upload files in groups of approximately 50,000 at any one time. After you upload each group of files, empty the contents of the %SystemRoot%\Temp folder on the server.

MORE INFORMATION

For more information about the SharePoint Portal Server SDK, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:7/7/2003
Keywords:kbbug kbpending KB323622 kbAudITPRO