I've only ever seen CopyFile
fail with a "permission denied" error in one of these 3 scenarios:
- An actual permission problem with either source or destination.
- Destination path is a folder, but does not have a trailing backslash.
- Source file is locked by an application.