472,952 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Need case-sensitive file search in VB.net

I need to determine if a specified path exists, including the case, but .net
isn't making this easy.

system.io.file.exists is case-insensitive. If I create a fileinfo object in
hopes to retrieve the FullName property, or use
System.IO.Path.GetFullPath(Path), the exact case used in the search is
returned. In other words, if I ToLower the path, I get a LC path returned.

Any suggestions?
Jul 11 '06 #1
1 1829
My guess would be that you have the proper case if you enumerate the
directories from the parent object (something like
di=di.Parent.GetDirectories(di.Name)(0) where di is the DirectoryInfo you
previously found).

You may want to elaborate a bit what is the exact problem it causes in your
application

--
Patrice

"Todd Beaulieu" <To**********@discussions.microsoft.coma écrit dans le
message de news: 66**********************************@microsoft.com...
>I need to determine if a specified path exists, including the case, but
.net
isn't making this easy.

system.io.file.exists is case-insensitive. If I create a fileinfo object
in
hopes to retrieve the FullName property, or use
System.IO.Path.GetFullPath(Path), the exact case used in the search is
returned. In other words, if I ToLower the path, I get a LC path returned.

Any suggestions?

Jul 11 '06 #2

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

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
1
by: Mike | last post by:
Hey guys need some help on the steps getting from one point to another. Here is the easy part. I have a combo box that is being loaded with 3 choices (small, medium, large) no problem here....
19
by: Fran?ois Laroche | last post by:
hey guys, I know that you will tell me that's easier to do in php or even in asp, but I just dont have the time to learn it 1- I need a javascript that will show the date of tomorrow 2- I need a...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: moondaddy | last post by:
I have some text in a page that when a certain even happens, I need to make it glow from black to red (through a spand of 1 second) pause for a few seconds, and then slowly change from red to black...
13
by: vgame64 | last post by:
Hi, I have been struggling with writing a program for a few hours. The requirements are that: """You will be writing a program which will determine whether a date is valid in terms of days in that...
2
by: tonesgirl85 | last post by:
I need some direction to know if I am on the right track. Please contique program below. import java.util.*; public class Roman { static Scanner console = new Scanner(System.in);
4
by: svgeorge | last post by:
I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment) -------------------------------------------------------------------------------- How TO COLLECT THE ROWS...
6
by: mwhit74 | last post by:
here is the code: // CS 200 Lab 11 Problem 3 - phone.cpp // Test program for the keyToTones function. #include <iostream> using namespace::std; // Definition of the PhoneTones struct
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.