file.copy
| Syntax |
file.copy (sourcepath, destpath)
|
| Params |
sourcepath is a path name to the file or folder to be copied. destpath is a path name to the file or folder to which the file or folder at sourcepath is to be copied.
|
| Action |
Copies the file or folder indicated by sourcepath to the destination defined in destpath.
|
| Returns |
True
|
| Examples |
file.copy ("C:\\Program Files\\Frontier\\cactus.gif", "C:\\Program Files\\Frontier\\Copy of cactus.gif") » true
The file "cactus.gif" is copied to "D:\\cactus.gif"
The file "ResEdit 2.1b3" is copied to the volume "XP150" as "ResEdit".
The file "ResEdit 2.1b3" is copied to the volume "XP150" retaining its original name.
If the folder "Tools" doesn't exist, it is created. The contents of "Utilities" are then copied into "Tools". |
| Notes |
No prompt for confirmation will be made if file.copy attempts to overwrite an existing file. If destpath defines a folder and sourcepath points to a file, the file will be copied into the folder. A new folder will be created at destpath if one isn't found there and if sourcepath and destpath define folders.
|
| See Also |
file.move
|