file class : CopyTo(string) method
Description
Copies a file.
Syntax
fileInstance.CopyTo(string path)
Arguments
| Class | Name | Description |
| string | path | Path of a file. |
Return value
| Class | Description |
| file | An instance that represents a file. |
Sample code
| 1: | file f = new file("c:\somewhere..."); |
| 2: | file newFile = f.CopyTo("c:\newpath..."); |
Notes
It's a wrapper of the System.IO.FileInfo.CopyTo(String) method.
An exception will be raised if the destination file exists.


