PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

Java File Copy with REPLACE_EXISTING

edited Nov 29, 2019 4:08AM in PeopleTools and Lifecycle Management - PSFT (MOSC) 1 commentAnswered

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");

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center