Author Topic: IFileSystem.CopyFolder Method  (Read 2329 times)

0 Members and 1 Guest are viewing this topic.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2524
  • User-Rate: +209/-0
  • Gender: Male
IFileSystem.CopyFolder Method
« on: July 14, 2008, 03:23:36 AM »

You can use:

JScript

Code: [Select]
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CopyFolder ("c:\\mydocuments\\letters\\*", "c:\\tempfolder\\")

VBScript

Code: [Select]
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFolder "c:\mydocuments\letters\*", "c:\tempfolder\"

PowerBASIC

Code: [Select]
LOCAL fso AS IFileSystem
fso = NEWCOM ("Scripting.FileSystemObject")
fso.CopyFolder UCODE$("c:\mydocuments\letters\*"), UCODE$("c:\tempfolder\"), %VARIANT_TRUE

But you cannot use:

JScript

Code: [Select]
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CopyFolder ("c:\\mydocuments\\*\\*", "c:\\tempfolder\\")

VBScript

Code: [Select]
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
FileSystemObject.CopyFolder "c:\mydocuments\*\*", "c:\tempfolder\"

PowerBASIC

Code: [Select]
LOCAL fso AS IFileSystem
fso = NEWCOM ("Scripting.FileSystemObject")
fso.CopyFolder UCODE$("c:\mydocuments\*\*"), UCODE$("c:\tempfolder\"), %VARIANT_TRUE