Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel VB Language Reference > Siebel VB Language Reference >
FileCopy Statement
This standard VB function copies a file.
Syntax
FileCopy [path1]source, [path2]target
Returns
Not applicable
Usage
Wildcards (* and ?) are not allowed in any of the arguments. The source file cannot be copied if it is opened by Siebel VB for anything other than Read access, or if it is open in another program.
Example
This example copies one file to another. Both filenames are specified by the user.
Sub Button_Click
Dim oldfile, newfile
On Error Resume Next
oldfile = "c:\temp\trace.txt"
newfile = "c:\temp\newtrace.txt"
FileCopy oldfile,newfile
If Err <> 0 then
msgtext = "Error during copy. Rerun program."
Else
msgtext = "Copy successful."
End If
End SubSee Also
FileAttr Function
FileDateTime Function
GetAttr Function
Kill Statement
Name Statement
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel VB Language Reference Published: 18 June 2003 |