473,385 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB.NET Exception Error...

Hi All,

I am very new to VB.NET and creating small project to that will copy all files from a DVD to a folder in the Hard Drive. While doing the copy around 30% I got the following error:

************** Exception Text **************
System.IO.IOException: Insufficient system resources exist to complete the requested service. at
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at
System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity

dirSecurity) at
System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) at
System.IO.Directory.CreateDirectory(String path) at
Microsoft.VisualBasic.FileIO.FileSystem.CopyOrMove File(CopyOrMove operation, String sourceFileName,
String destinationFileName, Boolean overwrite, UIOptionInternal showUI, UICancelOption onUserCancel)at
Microsoft.VisualBasic.MyServices.FileSystemProxy.C opyFile(String sourceFileName, String destinationFileName, UIOption showUI, UICancelOption onUserCancel) at
Transfer_DVD.Transfer.ProcessFileCopy() at
Transfer_DVD.Transfer.btnCopyDVD_Click(Object sender, EventArgs e) at
System.Windows.Forms.Control.OnClick(EventArgs e) at
System.Windows.Forms.Button.OnClick(EventArgs e) at
System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent) at
System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at
System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.ButtonBase.WndProc(Message& m) at
System.Windows.Forms.Button.WndProc(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m) at
System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Here is the code I am running to copy the files:
Me.ToolStripProgressBar1.Visible = True
Dim strFiles As ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(Me.cboCDDrives.Tex t, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
Me.ToolStripProgressBar1.Maximum = strFiles.Count
For nCount As Integer = 0 To strFiles.Count - 1
Dim strFoundFile As String = strFiles(nCount)
Me.ToolStripProgressBar1.Value = nCount
My.Computer.FileSystem.CopyFile(strFoundFile, strCopyToFolder & strFoundFile.Substring(3), FileIO.UIOption.OnlyErrorDialogs, FileIO.UICancelOption.DoNothing)
Next
Me.ToolStripProgressBar1.Value = strFiles.Count

There is more code than this, but this is the part where the file copy is being done.

I would appreciate if anybody can help debug this to find out what is causing the exception to happened.

Thanks!

--
Edhy Rijo

Nov 20 '06 #1
0 1366

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

Similar topics

6
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which...
7
by: Ekim | last post by:
hy, I've a question concerning exception-handling in c++: is there a possibility to catch any exception (I know one can do that by "catch(...)") and display its default-error-message (like in...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
40
by: Kevin Yu | last post by:
is it a bad programming design to throw exception in the try block then catch it??
3
by: will | last post by:
Hi all. I've got an question about how to catch an exception. In Page_Load, I place a DataGrid, dg1, into edit mode. This will call the method called GenericGridEvent. GenericGridEvent will call...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
9
by: Claudio Di Flumeri | last post by:
Hello all, I've added a global exception handler to my application in this way: Sub Main() AddHandler Application.ThreadException, AddressOf ThreadException AddHandler...
132
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid...
2
by: Darko Miletic | last post by:
Recently I wrote a dll in c++ and to simplify the distribution I decided to link with multithreaded static library (/MT or /MTd option). In debug everything works fine but in release I get this: ...
3
by: Robert Rawlins | last post by:
Hi Mk, Yeah it's got me a little bemused to be honest, I've tried playing around with configuration options this morning and not been able to achieve anything that works properly. I'll keep...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.