• Welcome to Jose's Read Only Forum 2023.
 

IFileSystem.MoveFolder Method

Started by José Roca, July 14, 2008, 02:19:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



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