写了一个函数,调用这个函数就好了,比如:MoveFile "D:\1.jpg", "D:\2.jpg"
返回值为true时代表移动成功,返回false时移动失败
Function MoveFile(ByVal SrcFile As String, DestFile As String) As Boolean
If SrcFile = "" Or DestFile = "" Then Exit Function
If SrcFile = DestFile Then Exit Function
On Error GoTo ErrTag
FileCopy SrcFile, DestFile
Kill SrcFile
MoveFile = True
Exit Function
ErrTag:
End Function