CopyHere

The ADSI container object CopyHere method copies an object into a container.

Syntax

Set CopiedObj = Object.CopyHere(SourceName, NewName)
 

Parts

CopiedObj
Accesses the copied object in the container.
object
The IIS Admin Object that contains the object. Usually the result of a previous GetObject operation.
SourceName
The name of the object to be copied.
NewName
The new name for the copied object.

Remarks

The CopiedObj variable receives a pointer to the object itself, which remains in the container.

When the contained object to be copied is part of an application, the CopyHere method will remove the application definition before copying the object. See the AppDelete method of the IIsWebVirtualDir and IIsWebDirectory objects.

Code Example

<% 
Dim ToVDirObj, FromVDirObj, RootVDirObj 
' Get the root virtual directory object for a server 
Set RootVDirObj = GetObject("IIS://LocalHost/W3SVC/4/ROOT") 
' Copy a virtual directory object 
' Also get a pointer to the new object 
Set ToVdirObj = RootVDirObj.CopyHere("VDir1", "VDir2") 
RootVDirObj.SetInfo 
%> 
 

See Also

GetObject, Create, Delete, MoveHere