欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片



Copy 方法

將指定的文件或文件夾從某位置復制到另一位置。

object.Copy destination[, overwrite]

參數(shù)

object

必選項。應為 FileFolder 對象的名稱。

destination

必選項。復制文件或文件夾的目標位置。不允許使用通配符。

overwrite

可選項。Boolean 值。如果覆蓋現(xiàn)有文件或文件夾,則 Boolean 值為 True(默認);否則為 False。

說明

對 File 或 Folder 應用 Copy 方法的結(jié)果與使用 FileSystemObject.CopyFile 或 FileSystemObject.CopyFolder 執(zhí)行的操作完全相同。在 FileSystemObject.CopyFile 或 FileSystemObject.CopyFolder 中,使用 object 引用文件或文件夾,并將文件或文件夾作為參數(shù)傳遞給 FileSystemObject.CopyFile 或 FileSystemObject.CopyFolder。然而,應該注意的是 FileSystemObject.CopyFile 或 FileSystemObject.CopyFolder 方法可以復制多個文件或文件夾。

下列示例顯示了 Copy 方法的使用:

Dim fso, MyFile
Set fso =CreateObject("Scripting.FileSystemObject")
Set MyFile =fso.CreateTextFile("c:\testfile.txt", True)
MyFile.WriteLine("這是一個測試")
MyFile.CloseSet MyFile =fso.GetFile("c:\testfile.txt")MyFile.Copy ("c:\windows\desktop\test2.txt")

請參閱

CopyFile 方法 | CopyFolder 方法 | Delete 方法 | Move 方法 | OpenAsTextStream 方法

應用于:File 對象 | Folder 對象

返回首頁