I am facing a problem while using the copy () method of IWDir class.
the code is as below:
protected static void DirCopy(IWFileSysService fileSysService, IWDir dir)
{
try {
dir.copy(fileSysService,
"/default/main/" + strBranchDest + "/WORKAREA/" + strWorkareaDest + "/" + strDirectoryDest,true);
System.out.println("Contents Copied Successfully");
}
catch (Exception e)
{
System.out.println("Dir copy failure is expected : " + e.getMessage());
}
}
There are two scenarios:
scenario 1:I copy the contents from one directory to another directory using the following java command
java directorycopy abc/myworkarea/dir1 xyz/hisworkarea/dir2
where abc is branch, myworkarea is workarea and dir1 is directory.
In the above scenarion dir2 does not exist on the target and hence this command successfully creates dir2 and copies the contents of dir1 in to dir2.
scenario2: I copy the contents from one directory to another directory using the following java command
java directorycopy abc/myworkarea/dir1 xyz/hisdirectory/dir2
where abc is branch, hisworkarea is workarea and dir2 is directory.
In the above scenarion dir2 exists on the target side.after execution of the above command , entire dir1 gets copied in to dir2 and what i see in dir2 is dir1.
I am facing problem with scenario 2.
In scenario 2 , i dont want dir1 to get copied into dir2 but wants contents of dir1 to be copied in to dir2.
Can anyone there help me out on this.
Your help will be highly appreciated.
Thanks in advance
Jeetu
Edited by jeetu on 07/24/03 06:29 AM (server time).