Copy link to clipboard
Copied
Hi All,
We have been using the File.copy function in the extendscript.
Due to some strange reason, the file copy is not getting completed.
From our troubleshooting we think the copy is not happening when the file size is more that 4gb. The copied file will be having a size different to the original file.
Here is the code snippet,
var assetPath = new File(pathToCopyFrom);
var result= assetPath.copy(filePath);
result comes as false.
Please advice.
Thanks and Regards,
Anoop NR
No dates available; we are investigating fixes for the issue, for inclusion in forthcoming releases.
Copy link to clipboard
Copied
Reproduced. Annoying!
Perhaps you can copy files at the JavaScript level, using CEP calls?
Copy link to clipboard
Copied
Hi Bruce,
Thank you for identifying the issue.
Any date when we can expect this to be resolved?
Thanks and Regards,
Anoop NR
Copy link to clipboard
Copied
No dates available; we are investigating fixes for the issue, for inclusion in forthcoming releases.
Copy link to clipboard
Copied
Hi Bruce,
Is there a fix for this issue?
Copy link to clipboard
Copied
Hello! Try to use batch file in Windows. For example:
var batFile = new File(fullPathToYourBatFile);
batFile.encoding = 'UTF-8';
var ff = batFile.open('w', 'TEXT');
var ff = batFile.writeln('@copy file1 file2 bla-bla');
var ff = batFile.close();
var ff = batFile.execute();
Copy link to clipboard
Copied
Would this be possible to do on a Mac?
Copy link to clipboard
Copied
The general meaning remains the same for MacOS. Copying the file will be performed by system tools and not by CEP. In the 4th line (writeln) you must specify the file copy command, which is used in MacOS terminal. Also you may add string like as 'var ff = batFile.remove()' to delete file your script created.