Copy problem: a directory with that destination name already exists
WPB (1391) 352 posts |
As part of the build process for a project I’m working on, an app is built in one directory, and then should be copied one level up as the last step in the makefile rules for that target. The command looks like: Copy !App ^.!App ~CF~VRBut I get the error: AMU: * File cannot be copied – a directory with that destination name already exists *Is there any way to get around that? I’d have thought the force and recurse options would make it just do it anyway? |
Andy S (2979) 504 posts |
What filing system and machine are you running this on? It might make a difference. |
Stuart Painting (5389) 714 posts |
This may indicate that the source and destination directory structures are different. For example, the source directory may have a file named “Extras” while the destination directory contains a directory named “Extras”. If you really want to discard the old directory structure, it might be an idea to *Wipe the destination directory first. |
WPB (1391) 352 posts |
Thanks for your input, everyone. It’s on SDFS, but also happens with Fat32fs. I’ve cracked it, in that I’ve worked out it happens when StrongHelp is running, because there’s a StrongHelp manual amongst what’s supposed to be copied. I think because StrongHelp implements its own filing system, that’s what causes the problem. Not sure how to get around that other than to ensure StrongHelp isn’t running before allowing the build to progress. |
Stuart Swales (8827) 1357 posts |
You could give it the wrong file type temporarily when building and set it to the correct type in the distribution. Had this problem myself some time ago with a Zip file as part of Fireworkz build process. |
WPB (1391) 352 posts |
That’s not a bad idea, Stuart, thanks. For now, I’ve pinched the running check in StrongHelp’s own !Run file to pop up a reminder that you need to quit !StrongHelp first. |