473,591 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"System Volume Information" directory

Hi, i check all directories on a disk but an error occurs
when i try to enter in the "System Volume Information"
directory.

Is there a way to "jump" this directory without to check
the name of the current directory to verify it's
not "System Volume Information" ?

Or, how to catch this error and continue the process when
the error occurs ?

Thanks.
Nov 15 '05 #1
1 4867
Just checking the name wouldn't be safe at all times either, other
directories may throw permission errors.
basically, you need to wrap your code in try-catch blocks, something like
string[] directories = <get folders>;
foreach (string directory in directories)
{
try
{
//do wahtever you need to with the directory.
}
catch (IOException ioe) {
//handle IOException conditions
}
catch (UnauthorizedAc cessException uae) {
//handle UnauthorizedAcc essException conditions
}
finally {
//do any code that must occur in any case.
}
}

should suffice, UnauthorizedAcc essException should handle filesystem
permission issues, the documentation for the various IO methods will have
more information on what specific exceptions they can throw.
You should be able to find more information on exception handling in msdn.
"Krazitchek " <kr********@hot mail.com> wrote in message
news:09******** *************** *****@phx.gbl.. .
Hi, i check all directories on a disk but an error occurs
when i try to enter in the "System Volume Information"
directory.

Is there a way to "jump" this directory without to check
the name of the current directory to verify it's
not "System Volume Information" ?

Or, how to catch this error and continue the process when
the error occurs ?

Thanks.

Nov 15 '05 #2

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

Similar topics

11
5630
by: T O | last post by:
Hi all, I am very new to C programming and have come across problem. My programme has opened and created a text document on the hard drive. The document name is stored in a string called "output". At the end of the program, I want to open the outputfile.txt automatically using notepad.
11
39874
by: Paminu | last post by:
Is there something like system("PAUSE") for linux?
3
8820
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I don't think I made any changes to either page other than changing the user control that creates the header). Server Error in '/myApp' Application. ---------------------------------------------------------------------------- ----
5
5657
by: msigwald | last post by:
I'm trying to write a little C program to run under linux, which must gain root so it can then shutdown the computer. I can get the code to execute the su command via system("su"), but once su comes into action, my program it's halted and su takes over. Because of this, I can't get my program to write the password su asks. I habe no idea on how to get C to communicate with other running processes such as su, but I understand it can be...
2
1526
by: alex | last post by:
I need to set a directory with hidden and/or system attribute from my c# code. Similar to what is c:\RECYCLER folder set to in WinXP. So it is not visible to a user with default "Folder Options". Is that possible? Thanks.
5
1988
by: Chris Robb | last post by:
I'm having some really odd behavior with a PHP script. I have it populating an HTML select form with a for loop. When I try the years 2006 to 1900. I get the following error: PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/chrobb/Sites/city-directory/controlBar.php:54) in /Users/chrobb/Sites/city-directory/controlBar.php on line 88 I've done a fair amount of searching and it looks...
8
3215
by: Henrik | last post by:
Hi Is there any way to see what the System process is doing? We have developed an application running at a production site to measure and optimize the production. The application needs to be responsive at all times during production. I'm experiencing some problems with my application not responding or responding slow. I suspeced the problem had to do with high CPU utilization
3
1527
by: Acrobatic | last post by:
Hello I've got a simple Perl script that works fine from the command line but not from PHP via the browser. It's a conversion program that converts an image to a different format, and writes the new image to a directory. I'm running as user "nobody" and have the target directory set to "nobody:nobody", and I've tried chmodding the directory to both 755 and 777 with no luck. If I run my script from the command line, it executes
1
2938
by: ramesh.nrk | last post by:
Hi, How can I retrieve Files/Folder from the "System Volume Information" folders from my system using C# code? thanks & regards. ramesh
0
7870
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
7992
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
6639
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
5732
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
5400
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
3850
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
2378
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
1
1465
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1199
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.