CreateFile method

Creates a file in the eRoom.
Note that if the source file is an internet shortcut or a link with a .url file extension, an eRoom link item will be created instead of a file.

Syntax


C++
HRESULT CreateFile (
   BSTR PathName,
   BSTR NewName,
   LONG CreateOptions,
   IERUItem** ppFile)
Scripting languages
Set File = Object.CreateFile (
   PathName as String,
   NewName as String,
   CreateOptions as Long)

Parameters


PathName

The full path of the file to add to the eRoom.

NewName

The name to give the newly-created file. If NewName is a blank string, the new file will have the same name as the file specified in PathName. [Optional. Default = blank string].

CreateOptions

One or more create options chosen from the enum ERUCreateOptions, logically OR'ed together. Valid create options for CreateFile are erCreateOptMakeNameUnique [optional, default = erCreateOptNone].

ppFile

Upon return, an IERUItem interface pointer to the newly-added file.

Return value


C++

The return code.

Scripting languages

An IERUItem interface pointer to the newly-added file.

Remarks


The path can be no longer than 255 characters.

The file you want to add must already be available in the file system before you call CreateFile.

Home

Interface

IERUContainer


See also

Creating Items