自己写FileCopyA函数:Public Sub FileCopyA(Des As String, Sou As String) Dim lc As Long lc = FileLen(Sou) Dim l As Long l = FreeFile() Open Sou For Binary Shared As #l On Error Goto ErrorHandle Dim lfs As Long lfs = l l = FreeFile() Open Des For Binary As #l
Dim lfd As Long lfd = l Dim bt() As Byte Redim bt(lc-1)
Get #lfs,,bt Close #lfs lfs = 0 Put #lfd,,bt Close #lfd exit sub ErrorHandle: ... End Sub'当然如果文件比较大那得一段一段拷才行。
Dim lc As Long
lc = FileLen(Sou) Dim l As Long
l = FreeFile() Open Sou For Binary Shared As #l On Error Goto ErrorHandle Dim lfs As Long
lfs = l l = FreeFile()
Open Des For Binary As #l
Dim lfd As Long
lfd = l Dim bt() As Byte
Redim bt(lc-1)
Get #lfs,,bt
Close #lfs
lfs = 0 Put #lfd,,bt
Close #lfd exit sub
ErrorHandle:
...
End Sub'当然如果文件比较大那得一段一段拷才行。