# Problem using copy action

**URL:** https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284
**Category:** Discussion
**Created:** [August 11, 2009, 4:28am UTC](https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284 "2009-08-11T04:28:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pkellner](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/pkellner/32/94_2.png) [@pkellner](https://www.finalbuilder.com/forums/u/pkellner)
#### Post date: [August 11, 2009, 4:28am UTC](https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284/1 "2009-08-11T04:28:58Z")

</div>

I'm trying to use the copy action.&nbsp; the file I'm copy to always prompts me when I do it by hand for (Overwrite? (Yes/No/All).

When I use the action (with the copy readonly flag checked), I get the following error.&nbsp; is there a better way to do this?

&nbsp;

[Action Failed] - Copy File(s) [D:\temp\3plogic\_fbwork1\3plogic\common\Settings\Developer\appSettings.xml -\> D:\temp\3plogic\_fbwork1\3plogic\service\TaskRunner\bin\Debug\Settings\Developer]  
Copying files: D:\temp\3plogic\_fbwork1\3plogic\common\Settings\Developer\appSettings.xml -\> D:\temp\3plogic\_fbwork1\3plogic\service\TaskRunner\bin\Debug\Settings\Developer

&nbsp;&nbsp;&nbsp; Files Copied

Failed to copy File : D:\temp\3plogic\_fbwork1\3plogic\common\Settings\Developer\appSettings.xml -\> D:\temp\3plogic\_fbwork1\3plogic\service\TaskRunner\bin\Debug\Settings\Developer  
Win32 Error : Access is denied

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 11, 2009, 5:28am UTC](https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284/2 "2009-08-11T05:28:27Z")

</div>

Hi Peter   
  
 Unfortunately the Access denied error comes from the CopyFileEx windows api call… my guess is that some other process has the file or part of it locked and there is not much we can do about that.

---

<div class="post-metadata">

### Author: ![pkellner](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/pkellner/32/94_2.png) [@pkellner](https://www.finalbuilder.com/forums/u/pkellner)
#### Post date: [August 11, 2009, 7:12am UTC](https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284/3 "2009-08-11T07:12:09Z")

</div>

I've written to that file earlier in the installation.&nbsp; Is there a more reliable way to copy the file that I've updated with finalbuilder previously?&nbsp; I&nbsp;can execute the command from the dos prompt with no problem.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 11, 2009, 8:23am UTC](https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284/4 "2009-08-11T08:23:39Z")

</div>

Which action did you use to write to the file? I’m wondering if FB is itself holding the lock on the file.

---

<div class="post-metadata">

### Author: ![pkellner](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/pkellner/32/94_2.png) [@pkellner](https://www.finalbuilder.com/forums/u/pkellner)
#### Post date: [August 11, 2009, 4:11am UTC](https://www.finalbuilder.com/forums/t/problem-using-copy-action/1284/5 "2009-08-11T04:11:59Z")

</div>

We are using Text Replace
