It's all about the answers!

Ask a question

problem with .put command


Gabriel Orce (1122) | asked Apr 21 '11, 8:08 p.m.
Hi,
I am trying to get files across to another server in a regular basis by using the .put command.
Everything goes fine the first time i do it - I can see the transferred files on the destination server - but when I try to repeat the operation with the same files (updated) to overwrite them, the job fails. When I then go to the destination server to manually delete these files I get a "cannot delete - file is in use" error message (or one that pretty much says that). I can finally manually delete the files and rerun the operation with success, but upon repeating for overwrite I get the same error situation.
The funny thing is that I have actually been able to make this work before, but i am not sure of what changed.
Both origin and destination are windows XP.
Build Forge is 7.1.2.0 and both agents are the same Version: 7.1.1.3

Any idea of what might be going on?

thanks!

2 answers



permanent link
Gabriel Orce (1122) | answered Apr 22 '11, 10:55 p.m.
If it's any good to anyone: Not sure how it had happened, but somehow the files at the origin started getting their "read-only" attribute set; so the first time they were sent ok, but the second time the attribute did not allow overwriting (and Build Forge is sometimes very cryptic with its error messages, which in this case only consisted of not even reporting an error, just giving as output the number "4").
The solution was to simply take the read-only attribute out before sending the file and it's been working smoothly ever since.

permanent link
Mark McLaughlin (4667) | answered May 18 '11, 12:55 a.m.
Thanks for the tip. This was a problem here too.

In my case there was an extract from TFS in an earlier step. All the files were extracted using "tf get..." They get created as read only. There was a step to take off the Read Only bit but in some cases it did not get executed. So we had a similar symptom... the first time something was copied it worked. On subsequent executions it fails because the previously copied file had the R attribute.

In our case it was .get rather than .put but it really the same.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.