Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iwcp isn't overwriting files
apsmiles
Hi,
I want to copy a file from a directory in one workarea to the same directory (even the directory str is same) in another workarea. I am using iwcp of TS 6.5 on a solaris box. So, the first time I am copying the file using the absolute path (from /default/main/branch....) it is getting copied. But the next time i am trying to copy it, it throws an error, saying Item already exists (This is the case when I haven't edited the dcr). But even if I edit the dcr and I am trying to copy it, it throws the same error. I also tried passing the absolute iwmnt path, that also isn't permitted.
I also tried using unix cp hoping that it would overwrite the existing file, but neither the command overwrite nor did it preserve the extended attributes of the dcr file.
Ghoti suggested to use iwupdate, but even that command throws an error saying ITem already exists.
Can somebody help me with some workaround. I definately dont want to remove the already existing file and then copy my current file.
Thanks in advance,
Anil
Find more posts tagged with
Comments
Adam Stoller
Please show the EXACT command(s) used - the role the user is logged in with (and the highest role they *can* log in with) - and the EXACT error message received.
Did you read the other posts to which I referred in my previous response?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
apsmiles
I had gone through a lot of posts related to iwcp, these two were among them. But right now iwcp is not failing (as is the case where you have suggested to give path from iwmnt) even if I am giving path from /default/main....etc IT IS ONLY NOT ABLE TO COPY THE FILE IF IT ALREADY exists.
Let me first write the code i am using:
my $sourcePath = $listOfDCRs[$file];
if($listOfDCRs[$file] =~ m/(.*)\/WA1\/(.*)/)
{
$destPath = $1.'/WA2/'.$2;
$listOfDCRs[$file] = $destPath; }
$cmd = $binDir.'iwcp '.$sourcePath.' '.$destPath;
try
{
`$cmd`;
}
otherwise
{
$logger->error("\n Could not copy :\n $sourcePath \nTo : \n$destPath \nthrough the command : $cmd");
};
I tried running the above generated command on console but it still gave me same error. "File already exists". I did the same using iwupdate but it again says, "File already exists".
The above is being done with a user role of master.
Thanks in advance !
Adam Stoller
What command line flags did you use with iwupdate?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
reddyl
Hi fish,
I am also getin the same error when using iwcp CLT. I tried to look for iwcp CLT documentation in TeamSite 6.5 Command Line Tools but could not find there. Does it mean that iwcp is deprecated.
Thanks
reddy
Adam Stoller
Hah! That's funny - I guess I always used
iwcp -h
and never looked in the manual (or I did and I filed this before) because apparently it's never managed to get documented in the CLT manual.
I suggest someone contact support and enter this as a doc bug .... (Lissa - you wanna do that?)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com