473,772 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copying my file to another location on the hard disk

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

Aug 24 '06 #1
2 1788
On 24 Aug 2006 04:14:24 -0700, "jatphat" <ja*****@gmail. comwrote:
>Somebody help me.
How do i copy my Access database from one location on my hard disk to
another .
i tried file.copy(sourc e, distination ) but the file would not move.
i always get this error message "Another process is using the
destinationFil eName" .
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.Fil eSystem.CopyFil e method which, I believe, will not
error on copying open files.

Gene
Aug 25 '06 #2
I am using vb.net 2003 and i am not able to use the file.copy
(source,destina tion) to copy my access file that is not opened to
another location on my hard disk
gene kelley wrote:
On 24 Aug 2006 04:14:24 -0700, "jatphat" <ja*****@gmail. comwrote:
Somebody help me.
How do i copy my Access database from one location on my hard disk to
another .
i tried file.copy(sourc e, distination ) but the file would not move.
i always get this error message "Another process is using the
destinationFile Name" .
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.Fil eSystem.CopyFil e method which, I believe, will not
error on copying open files.

Gene
Aug 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
7433
by: Bryan Rickard | last post by:
I wrote a simple program in VB6 to copy all the files from a directory on a CD-ROM to my hard disk. There are about 10 files, each about 30MB. The program uses Get and Put to get data from the CD into a buffer and then put it into the disk. See code below. It works, but it slows down drastically before it copies all the files. Windows Task Manager shows the CPU usage gradually increasing as the files are copied, until it reaches 100...
11
2341
by: MLH | last post by:
I don't know how it happened. I have hundreds of hours worth of work invested in a file I foolishly named DB9.mdb. I was intending on renaming the file soon. But I neglected to do so before getting caught up in a new project. When I did, I forgot about the filename I was working under. One day, and I don't know how long ago it was, I deleted db*.mdb and db*.ldb from the development directory as a routine part of disk housekeeping.
6
1991
by: Jim Heavey | last post by:
I have written a little application which copies files from one location to another location. Before it copies the file, it ensure the directory for both the from and to locations is valid. It also ensures that the from file exists. All that being successful, it attempts to copy the file, but each time I get an exception in which the text of the message says "The process can not copy the file XXXXXXXXX because it is being used by...
16
9532
by: Otie | last post by:
Hi, Is there a way for VB5 to determine exactly where on a hard drive a .exe file is stored upon the .exe file's first copying to the hard drive? What I need to know is the exact hard drive sector, cluster, partition, etc. information so I can use it later on to determine if the file was ever deleted and restored or moved elsewhere. Thank you.
3
3150
by: noridotjabi | last post by:
Say I'm writting a program. In this program for some reason I need to store data somewere were I will be able to access it again. I don't want to store it in a file because then it could be deleted by another program or user. So, is there anyway to save data onto a computer so that it will not apear as a file (actually idealy not apear as anything at all), but will not get overwritten by any other program or file. If this is OS...
13
1976
by: =?Utf-8?B?Um9iS2lubmV5MQ==?= | last post by:
Hello, Here is a head scratcher for you all: We were wondering if it is possible to redirect file input to a place in memory (say a byte array for example). More specifically, if a function were to take only an input string directed to a file path (physical hard drive location), is there a way to trick that function into reading a memory location instead that we manage? Is this possible?
1
64192
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C programming. FYI Although I have called this article “How to Parse a File in C++”, we are actually mostly lexing a file which is the breaking down of a stream in to its component parts, disregarding the syntax that stream contains. Parsing is actually including the syntax in order to make...
12
4737
by: glennanthonyb | last post by:
Hi The company I work for has finally woken up to data security on our field laptops. I'm writing something in C# that will allow remote deletion of sensitive data and I don't believe File.Delete() will be sufficient. Is there anything in .NET that removes any remanence of the file? If it isn't going to be easy, does anyone know of a component that I can hook into to do the dirty work, free of otherwise?
2
2120
by: chazzy69 | last post by:
This is a little hard to explain but i will try to make it as clear as possible. Firstly here's the setup, 2 databases on 2 different servers (databases are identical) now within the first database is a bunch of locations to images, though instead of a full path it only includes the file name not an absolute path( e.g. image.jpg). Now im trying to copy the names to another database this is no problem but obviously the the images don't...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.