Copies a file specified by a URL from one location to another. The URL may specify HTTP addresses (prefix 'http://'), FTP addresses (prefix 'ftp: addresses (prefix 'file:/').
Number | Type | Compulsory | Default | Description |
1 | string | Yes | From URL file | |
2 | string | Yes | To URL file | |
3 | string | No | progress | options |
URL of source file.
URL of destination file
Options: can be 'progress' or 'noprogress'. If set to 'progress' (the default) a box will display with a bar showing the progress of the file transfer. Otherwise no such box will display.
Return type: string array
Id | Description |
IncorrectLogin | A username and password are required for this URL |
HostNotFound | The specified host in the URL could not be found. This error can also occur if there is no Internet connection. |
Unexpected2 | This is an internal error that should not occur |
MkdirError | Could not create target directory |
RemoveError | This is an internal error that should not occur |
RenameError | This is an internal error that should not occur |
GetError | An error occurred while fetching a file |
PutError | An error occurred while storing a file |
FileNotExist | File doesn't exist |
PermissionDenied | You do not have sufficient privilege to perform the operation |
Unknown Error | This is an internal error that should not occur |
The second element of the returned string gives a descriptive message providing more information about the cause of failure.
▲Function Summary▲ | ||
◄ CopyTree | cos ▶ |