The following example illustrates the use of the
MoveFolder method.
JScript
function MoveFldr2Desktop(fldrspec)
{
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.MoveFolder(fldrspec, "c:\\windows\\desktop\\");
}
VBScript
Sub MoveFldr2Desktop(Drivespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFolder Drivespec, "c:\windows\desktop\"
End Sub
PowerBASIC
SUB MoveFldr2Desktop (BYVAL strDriveSpec AS STRING)
LOCAL fso AS IFileSystem
fso = NEWCOM "Scripting.FileSystemObject"
fso.MoveFolder UCODE$(strDriveSpec), UCODE$("c:\windows\desktop\")
END SUB