World Of Webmaster
Đăng nhập / Đăng ký
Account
Free for web
Check pagerank
Input check pager (Not http://)

Ext: blog.kai.vn
Check google pagerank
View HTML source
FUNCTION LIBRARY
HTML Tags Library
PHP Functions Library ASP Functions Library
ASP Functions FileCopy
Chức năng: Copy một file hoặc một folder
Ngôn ngữ: asp - Nhóm: file_folder
CÚ PHÁP
 FileCopy source, destination 

Copy file hoặc folder.
Cần thiết có 2 đối số:
Source:file/folder nguồn.
destination: Đích.
Chú ý: Cần đối số nguồn và đích với đường dẫn đầy đủ !

VÍ DỤ
<%
  '--- Copy file.txt from New folder, name the  copy file2.txt and put it in the same folder as the original. 
    FileCopy    "C:\New  Folder\file.txt", "C:\New Folder\file2.txt"
%> 
ASP Code
<%
  Private Sub FileCopy(byVal source, byVal destination)
      Dim objFSO, objToCopy, boolErr, strErrDesc
      On Error Resume Next
      Set objFSO = Server.CreateObject("scripting.filesystemobject")
      if instr( right( source, 4 ), "." ) then
           '--- probably a file
          Set objToCopy = objFSO.GetFile(source)
      else
           '--- probably a directory or folder
          Set objToCopy = objFSO.GetFolder(source)
      end if
      objToCopy.Copy destination
      if Err Then 
          boolErr = True
          strErrDesc = Err.Description
      end if
      Set objToCopy = Nothing
      Set objFSO = Nothing
      On Error GoTo 0
      if boolErr then Err.Raise 5104, "FileCopy  Statement", strErrDesc
  End Sub
%> 

DoExecute
FileCount
FileCreate
FileDateTime
FileDelete
FileFind
FileRead
FileRename
FileWrite
FolderCount
Library ›› HTML Tag | PHP Function | ASP Function
Page : 873886
Online :
Visited : 396941
 
Liên h | Thêm vào Favorite | Gửi link qua e-mail | Thông tin website
Copright © 2009 KAI Blog
Code by BOINGOnline. Contact email : contact@kai.vn
Theme: default | classic |