FileSystemObject.MoveFolder()

JScript3.0+Syntax

							filesystemobject.MoveFolder(/arguments/)

Description

The MoveFolder() method is used to move one or more folders from one location to another.

Example

Listing 9.93 shows how the NewFolder() method is used. An instance of the FileSystemObject is created and then used to move the subtmp folder to the root directory on the C drive.

Listing 9.93 Example of MoveFolder()
<html>
<body>

<script language="JScript">
<!-- Hide

function move()
{
  var myObject;
  // Create an instance of the FileSystemObject
  myObject = new ActiveXObject("Scripting.FileSystemObject");

  // Folder is moved
  myObject.MoveFolder("c:\\tmp\\subtmp", "c:\\");
} // End Hide --> </script> Move the folder "subtmp" from c:\tmp\subtmp ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.