473,811 Members | 3,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

system.io.file not found exception

19 New Member
Hi,
During file copy, I'm giving the absolute file name. But the compiler says file not found always. Is it a problem in my system or any error in my program.
Expand|Select|Wrap|Line Numbers
  1.  
  2.  Public Sub backupDB()
  3.         Try
  4.  
  5.             Dim FileToCopy As String
  6.             Dim NewCopy As String
  7.  
  8.             FileToCopy = "E:\Gyana_projects\Medicine_Stores_Management.accdb"
  9.             NewCopy = String.Format("D:\BackUps\{0:yyyyMMdd}.mdb", Date.Today)
  10.  
  11.             FileCopy(FileToCopy, NewCopy)
  12.      MsgBox("Backup Successful")
  13.         Catch ex As Exception
  14.             MessageBox.Show(ex.ToString)
  15.         End Try
  16.     End Sub
  17.  
  18.  
Also I'm Giving the absolute path of the file by Copying it from the address bar
i.e:E:\Gyana_pr ojects
File name is: Medicine_Stores _Management.acc db
Plz help ASAP.
Thanks in advance
Jan 14 '11 #1
5 3198
prasad599
24 New Member
Have you tried giving same file extension, because your src file is .accdb and destination is .mdb
Jan 14 '11 #2
GR M
19 New Member
Yes, I have tried those. The only soln I'v Got, that the code is almost perfect.The problem might be in the system. The Access That I'v used is of unregistered version. While openining, It always asks to register. This might be the cause of all problem. I'v modified the code to copy other files, such as .vb or .txt. It works fine. Thanks for your prompt reply MR. Prasad599. Plz reply me on these thoughts.
Jan 15 '11 #3
prasad599
24 New Member
Is your OS version higher than win XP ?
Jan 15 '11 #4
GR M
19 New Member
No. I'm running on Win xp Sp3.
Jan 15 '11 #5
GR M
19 New Member
Hello Prasd599, I'v finally made it. Actually the code was perfect. The problem was with the unregistered version of MS Access. I'v fixed it and all is well. Thanks a lot Showing interest in my problem. Tk Kr.
Jan 18 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1292
by: manika | last post by:
Hi, I am trying to upload a file and then copy it to a different destination. I use File.Copy.For some files I get "File not found" exception when I try to use the File.copy utility while others are uploaded and copied successfully. Is there a path limitation? manika
13
2584
by: Alexandra | last post by:
Hi, I have a hidden system file that I need to read. I am logged in as an administrator. I can not change the file attributes using the windows explorer.
6
27870
by: chanmm | last post by:
Dear all, I have run the same web application in my Windows XP Pro without any problem but once I deploy it in Windows 2003 Server the message below appear: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) I checked all the files I need in those paths and nothing is missing in fact. Anyone can help?
3
2543
by: shajeel | last post by:
i got this exception while calling Timer.Start() Number must be either non-negative or -1. Parameter name: dueTime can any one tell me the reason. timer interval is set to 180000. and after restarting application it is not occuring. Regards
0
1815
by: Dithos | last post by:
Hi all, I hope somebody will be able to help me here and i am in a predicament as to how to solve this problem.i have been trying it since a week. i have 3 projects, say A, B and C. A is a managed c++ code. B is a c# .net code which is using project A as reference. C is also a c# .NET code which is using B as a reference. I have installed the dll file of B and A in GAC. When i run C from where a function present in B is called( which...
3
1209
by: gomzi | last post by:
hi, When I try to upload something using the fileupload control that comes with .NET I keep getting a file not found exception. This below piece of code throws up this error. me.fileupload1.postedfile.filename Any idea as to what might be going on here? thanks, gomzi.
5
5586
by: Lilith | last post by:
Would I be correct in assuming that the system file watcher is only valid for local drives and won't work for networked file system? -- Lilith
4
2146
by: vasavimaruthi | last post by:
hi, i got class not found exception of a small jdbc program in windows. the program is like this import java.sql.*; public class Db1 { public static void main(String a) throws Exception { Class.forName("oracle.jdbc.driver.OracleDriver");
2
6667
madhoriya22
by: madhoriya22 | last post by:
Hi, I am getting No Collection Found Exception .. while iterating through ArrayList in jsp page. What am I doing is : I am clicking a link <html:link href="./viewAll.do">2. View All Information</a></html:link> and the request is suppose to go to the corresponding Action class. But control is not going to action class. I have checked all the mappings. Here is the mapping : <action path="/viewAll"...
4
23555
by: yogarajan | last post by:
The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) Source Error: An unhandled...
0
10644
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
10379
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...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
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...
0
6882
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
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.