Home All Groups Group Topic Archive Search About

Copying my file to another location on the hard disk

Author
24 Aug 2006 11:14 AM
jatphat
Somebody help me.
How do i copy my Access database from one location on my hard disk to
another .
i tried file.copy(source, distination ) but the file would not move.
i always get this error  message "Another process is using the
destinationFileName" .
thanks

Author
25 Aug 2006 12:12 AM
gene kelley
On 24 Aug 2006 04:14:24 -0700, "jatphat" <jatp***@gmail.com> wrote:

>Somebody help me.
>How do i copy my Access database from one location on my hard disk to
>another .
>i tried file.copy(source, distination ) but the file would not move.
>i always get this error  message "Another process is using the
>destinationFileName" .
>thanks

"File.Copy" by design does not allow a file that is currently open to be copied. 
It appears that you are trying to create a copy of an Access database file that is currently open
and in use.

If using VB2005, you might look at My.Computer.FileSystem.CopyFile method which, I believe, will not
error on copying open files.

Gene
Author
25 Aug 2006 11:49 AM
jatphat
I am using vb.net 2003 and i am not able to use the file.copy
(source,destination) to copy my access file that is not opened to
another location on my hard disk
gene kelley wrote:

Show quoteHide quote
> On 24 Aug 2006 04:14:24 -0700, "jatphat" <jatp***@gmail.com> wrote:
>
> >Somebody help me.
> >How do i copy my Access database from one location on my hard disk to
> >another .
> >i tried file.copy(source, distination ) but the file would not move.
> >i always get this error  message "Another process is using the
> >destinationFileName" .
> >thanks
>
> "File.Copy" by design does not allow a file that is currently open to be copied.
> It appears that you are trying to create a copy of an Access database file that is currently open
> and in use.
>
> If using VB2005, you might look at My.Computer.FileSystem.CopyFile method which, I believe, will not
> error on copying open files.
>
> Gene