I am currently working on RecycleBin. When a document gets deleted all versions get deleted from multiple locations. When this occurs all folder paths get deleted to a repeating string dp_original_folder_paths.
I want to run a check to see if the folder paths exists and if they do not create them.
Here is my current code. The first part checks if file exists if not creates it. The second part links the document back to original location.
for (int i = 0;
i < relationRecord.getValueCount("dp_original_folder_paths"); i++)
{
File f = new File(relationRecord.getRepeatingString(
"dp_original_folder_paths",
i));
if(!f.exists())
{
System.out.println("creating directory" + f);
f.mkdir();
}
// Link the document back to the original folders
for (int i = 0; i < relationRecord.getValueCount("dp_original_folder_paths")
i++)
{
document.link(
relationRecord.getRepeatingString("dp_original_folder_paths", i));
}
The output given is
creating directory: \EAM\sbotest
DIR created
Linked to /EAM/sbotest
DfPathNotFoundException:: THREAD: http-bio-8080-exec-7; MSG: [DM_API_E_EXIST]err or: "Folder specified by /EAM/sbotest does not exist."; ERRORCODE: 100; NEXT: null
Thanks for any help.