Java File Copy with REPLACE_EXISTING
I'm trying to write a conversion routine involving file attachments and I'll be required to copy files from their old file store to a new file store, in a different directory structure.
I'm trying to use Java File Copy and it is working fine, but when trying to use REPLACE_EXISTING I am not having success.
Here is the file copy code:
Local JavaObject &pathsClass = GetJavaClass("java.nio.file.Paths");
Local JavaObject &j_sourceFile = &pathsClass.get(&sourceDir, CreateJavaObject("java.lang.String[]", &sourceFile));
Local JavaObject &j_targetFile = &pathsClass.get(&targetDir, CreateJavaObject("java.lang.String[]", &targetFile));
Local JavaObject &javaNIO = GetJavaClass("java.nio.file.Files");