You may be thinking of the FileCopy function but I also found this code on
the net which may be what your looking for.
HTH,
Dale.
Public Function CopyFile(srcefile As String, destfile As String, _
errnum As Integer) As Boolean
'*****************************************************************
'
Copies individual files to new location.
'
Boolean:
' Success level of function
'
Public
'
srcefile:
' Full Filepath & Filename of source
' destfile:
' Full Filepath & Filename of destination
'
'
blnCopy = CopyFile("c:\autoexec.bat", _
' "c:\temp\autoexec.old", 0)
'*****************************************************************
Dim intAttr As Integer
DoEvents
CopyFile = False
On Error Resume Next
Err = 0
FileCopy srcefile, destfile
Select Case Err
Case 0 ' OK
CopyFile = True
Case 75 ' Path/File Access error
intAttr = GetAttr(destfile)
SetAttr destfile, vbNormal
Err = 0
FileCopy srcefile, destfile
If Err = 0 Then
intAttr = intAttr Or vbArchive
SetAttr destfile, intAttr
CopyFile = True
Else
errnum = Err
End If
Case Else ' Other error
errnum = Err
End Select
End Function
wrote in message
news:5065026@discussion.autodesk.com...
Hello People:
Anyone know what reference is for copyFile, because visualbasic not
recognize this command, thanx!!