473,386 Members | 1,699 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,386 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 1840
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...

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.