Copy the file.
Syntax: |
---|
DlxFile.Copy(fileName) |
Parameters
Parameter | Description |
---|---|
fileName | Relative or complete path of the target file. |
Return Value
If the file copies successfully, it returns true otherwise it returns false.
Remarks
If a full path is not specified, each file path is assumed to be relative to the Drawlogix working directory. For example, the relative path "myscripts\firstscript.clxjs" is changed to the full path "c:\....\documents\alterlogix\drawlogix\myscripts\firstscript.clxjs".
Example
Copy code | |
---|---|
var file = new DlxFile("www.mysite/files/myfile.pdf", DlxApp.FILEOPEN_READBINARY);
if (file.IsValid())
{
file.Copy("myfile.pdf");
file.Close();
}
else DlxApp.Printf("File not found.");
|