About copyfile: checking results
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
About copyfile: checking results
Hi,
I use in my app (FWH 8.05) the function CopyFile (<orig.file>,<dest.file>,.f.) to make a backup of some archive files.
The problem is that I have a customer where some files are (randomly) not copied. I cheked that copyfile return (.f.) on those files so an error occurred.
I would like have an extended error code (like ferror() to be clear) in order to know the origin of this problem. Is it possibile to make this using copyfile or is there any other copy function with an extended error code manager that can I use ?
Thanks.
I use in my app (FWH 8.05) the function CopyFile (<orig.file>,<dest.file>,.f.) to make a backup of some archive files.
The problem is that I have a customer where some files are (randomly) not copied. I cheked that copyfile return (.f.) on those files so an error occurred.
I would like have an extended error code (like ferror() to be clear) in order to know the origin of this problem. Is it possibile to make this using copyfile or is there any other copy function with an extended error code manager that can I use ?
Thanks.
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
I tracked the COPYFILE function errors using GetLastError()
and an 1006 error appairs randomly copying files from an hard disk to a pen drive.
This is the Microsoft error code:
---
ERROR_FILE_INVALID
1006
0x3EE
The volume for a file has been externally altered so that the opened file is no longer valid.
---
Is there anyone that already had this error copying data on a pen drive ?
Any ideas ?
Thanks.
and an 1006 error appairs randomly copying files from an hard disk to a pen drive.
This is the Microsoft error code:
---
ERROR_FILE_INVALID
1006
0x3EE
The volume for a file has been externally altered so that the opened file is no longer valid.
---
Is there anyone that already had this error copying data on a pen drive ?
Any ideas ?
Thanks.
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
I use CopyFile() intensively to copy from hard disk to USB devices and never noticed any problems. This is the CopyFile() definition I'm using:
EMG
Code: Select all
DLL32 FUNCTION COPYFILE( cExistingFileName AS LPSTR, cNewFileName AS LPSTR, lFailIfExists AS LONG ) AS BOOL;
PASCAL FROM "CopyFileA" LIB "kernel32.dll"
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Hi Enrico, thanks for your reply.Enrico Maria Giordano wrote:I use CopyFile() intensively to copy from hard disk to USB devices and never noticed any problems. This is the CopyFile() definition I'm using:
EMGCode: Select all
DLL32 FUNCTION COPYFILE( cExistingFileName AS LPSTR, cNewFileName AS LPSTR, lFailIfExists AS LONG ) AS BOOL; PASCAL FROM "CopyFileA" LIB "kernel32.dll"
I am using the standard copyfile provided from FWH and the DLL32 code is the same.
I think it could be an OS/Hardware issue due to the fact that I also have a lot of customers that never reported me this problem but I would like give a suggest to this customer in order to solve/bypass this problem.
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Yes,Antonio Linares wrote:Enrico,
It seems as there is no a GPF but an error returned code.
Marco, maybe you could try it for n times, in case that another try is able to do it.
in the meantime I asked the customer to format this pen drive
and if the problem still remains I will try the copyfile 3 times before to stop the routine and display the error code.
Thanks to all.
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Marco,
I had a problem with USB drive on my VISTA PC, too.
http://forums.fivetechsoft.com/viewtopi ... 41&start=0
What is ISREADY( cDrive ) returning?
Here it errored out with this error screen. As a solution I deinstalled all the USB ports and drivers and installed the USB ports again.
Regards,
Otto
I had a problem with USB drive on my VISTA PC, too.
http://forums.fivetechsoft.com/viewtopi ... 41&start=0
What is ISREADY( cDrive ) returning?
Here it errored out with this error screen. As a solution I deinstalled all the USB ports and drivers and installed the USB ports again.
Regards,
Otto
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: