jackjord
Aug 3rd, 2001, 06:06 AM
I am using the SHFileOperation function to copy files so I can display the explorer copy dialog box.
However, I am having a problem trapping an error. I am copying the same file to a number of different folders, which normally works fine. But when I attempt to copy the file to a folder where the user has the file open I get the "Cannot Access File" error dialog box. How can I trap this error? I have the flags set to:
.fFlags = FOF_SIMPLEPROGRESS Or FOF_NOCONFIRMATION
I have the NoConfirmation flag set because I want the new file to have the same name as the existing file, but do not want the "Do you want to replace......." dialog box to appear. The program runs as a scheduled event so user intervention is not an option. Prior to using the explorer copy I just used the file copy statement and used the err.number to determine how to handler the error.
Thanks for any help.
:)
However, I am having a problem trapping an error. I am copying the same file to a number of different folders, which normally works fine. But when I attempt to copy the file to a folder where the user has the file open I get the "Cannot Access File" error dialog box. How can I trap this error? I have the flags set to:
.fFlags = FOF_SIMPLEPROGRESS Or FOF_NOCONFIRMATION
I have the NoConfirmation flag set because I want the new file to have the same name as the existing file, but do not want the "Do you want to replace......." dialog box to appear. The program runs as a scheduled event so user intervention is not an option. Prior to using the explorer copy I just used the file copy statement and used the err.number to determine how to handler the error.
Thanks for any help.
:)