Cut and Paste Virtual Directories

by Mitch Tulloch [Published on 6 Sept. 2005 / Last Updated on 6 Sept. 2005]

It would be nice if one could cut and paste a virtual directory from one IIS website to another.

It would be nice if one could cut and paste a virtual directory from one IIS website to another. Unfortunately the IIS 6 GUI just isn't that capable. But there is an easy way to copy a virtual directory from one site to another on the same IIS web server:

  1. Right-click on the virtual directory in the original website and select Save Configuration To File. This will save the portion of the XML metabase that contains the configuration info for the vdir.
  2. Right-click on the target website and select New |  Virtual Directory From File, specify the previously saved XML file, click Read File, select the file to import, and click Ok.

Another way is to use the Iiscnfg.vbs script to export the vdir from the old site and import it into the new one.

See Also

Featured Links