#624 closed Feature Request (Rejected)
FileCopy() - need better error return, and maybe protect existing dest file
| Reported by: | Arbie | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
After a bit of research on using FileCopy(), here are two suggestions:
1) Make FileCopy() return "@error" so that elaborate means are not required to determine the success of the operation.
2) Don't delete an existing destination file before making the copy, if you can avoid it.
Thanks for a great program -
- Baker
Attachments (0)
Change History (3)
comment:1 by , on Oct 16, 2008 at 8:00:11 PM
| Version: | 3.2.12.0 |
|---|
comment:2 by , on Oct 17, 2008 at 6:30:26 AM
I don't understand your second point as you need to use flag=1 to overwrite an existing file.
comment:3 by , on Oct 30, 2008 at 6:52:53 PM
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
If you are not satisfied with the behavior of FileCopy(), then wrap the built-in function with your own function that has the other functionality you desire. As for your second point, JP is right. The destination must be deleted before the copy can take place and that only happens if you specify a flag.

Automatic ticket cleanup.