วิธีASP CopyFile
❮ อ้างอิงวัตถุ FileSystemObject ที่สมบูรณ์
วิธีการ CopyFile จะคัดลอกไฟล์ตั้งแต่หนึ่งไฟล์ขึ้นไปจากที่หนึ่งไปยังอีกที่หนึ่ง
ไวยากรณ์
FileSystemObject.CopyFile source,destination[,overwrite]
Parameter | Description |
---|---|
source | Required. The file or files to copy (wildcards can be used} |
destination | Required. Where to copy the file or files (wildcards cannot be used} |
overwrite | Optional. A Boolean value that specifies whether an existing file can be overwritten. True allows existing files to be overwritten and False prevents existing files from being overwritten. Default is True |
ตัวอย่าง
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CopyFile "c:\mydocuments\web\*.htm","c:\webpages\"
set fs=nothing
%>
❮ อ้างอิงวัตถุ FileSystemObject ที่สมบูรณ์