From: Bob on
I found a message to do with XP SP2 causing this but no solution. I
have a backup app that will backup from a users My Documents to their
home directory on our file server. This has worked really well and
then now some users are unable to backup. I just need to copy a file
at a time if new or changed copy the file to their home directory.

Is there a solution to this and still use FileCopy? If not what is the
alternative to use?

Thanks,
Bob

From: Dmitriy Antonov on

"Bob" <askeyb(a)hotmail.com> wrote in message
news:1162246023.012300.301690(a)e3g2000cwe.googlegroups.com...
>I found a message to do with XP SP2 causing this but no solution. I
> have a backup app that will backup from a users My Documents to their
> home directory on our file server. This has worked really well and
> then now some users are unable to backup. I just need to copy a file
> at a time if new or changed copy the file to their home directory.
>
> Is there a solution to this and still use FileCopy? If not what is the
> alternative to use?
>
> Thanks,
> Bob
>

If FileCopy statement fails, then you may consider CopyFile function from
WinAPI.
I've just answered similar question in another group and here is the sample
I used there:

Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal
lpExistingFileName As String, ByVal lpNewFileName As String, ByVal
bFailIfExists As Long) As Long

Private Sub Command1_Click()
' FileCopy "C:\My Documents\db1.mdb", "C:\My Documents\Temp"
CopyFile "C:\My Documents\db1.mdb", "C:\My Documents\Temp\db1.mdb.bak",
0
End Sub

Dmitriy.


From: Lorin on
Is the destination of the same name and is it write protected?

I do this, but I use get and put with DoEvents between buffer get/puts so
that VB does not freeze up while copying. A little more work but the users
do not get nervous - you can even use a progress bar to show them it is
copying.

"Bob" wrote:

> I found a message to do with XP SP2 causing this but no solution. I
> have a backup app that will backup from a users My Documents to their
> home directory on our file server. This has worked really well and
> then now some users are unable to backup. I just need to copy a file
> at a time if new or changed copy the file to their home directory.
>
> Is there a solution to this and still use FileCopy? If not what is the
> alternative to use?
>
> Thanks,
> Bob
>
>
From: Bob on
The destination is the user home directory which is a different
location the the source. The app automatically runs every six hours to
backup new or changed files found in My Documents. The user of course
has to be logged on for this to work.

Lorin wrote:
> Is the destination of the same name and is it write protected?
>
> I do this, but I use get and put with DoEvents between buffer get/puts so
> that VB does not freeze up while copying. A little more work but the users
> do not get nervous - you can even use a progress bar to show them it is
> copying.
>
> "Bob" wrote:
>
> > I found a message to do with XP SP2 causing this but no solution. I
> > have a backup app that will backup from a users My Documents to their
> > home directory on our file server. This has worked really well and
> > then now some users are unable to backup. I just need to copy a file
> > at a time if new or changed copy the file to their home directory.
> >
> > Is there a solution to this and still use FileCopy? If not what is the
> > alternative to use?
> >
> > Thanks,
> > Bob
> >
> >