Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / September 2004

Tip: Looking for answers? Try searching our database.

How to get "Case-Sensitive" file name?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TK - 10 Sep 2004 04:53 GMT
Hi,

I have a problem to get a file name with case-sensitivity.

My application (actually an Windows service) is using
System.IO.FileSystemWatcher class to monitor file/folder operation by users.
It's working fine expect a point that the e.FullPath property has a path
name in lower case only.

My application is actually a "File Replication & Synchronization System"
type of application. And it have be able to work with other instances
running on separated Windows and Unix server machines. So my app have to
know and tell real file name to the 'teamed' instances on other nodes.

I tried pass the e.FullPath to System.IO.FileInfo then see FileInfo.Name and
FullName property, but no luck.

Why do these properties have strings in lower case only?

Any workarounds?

best reagards,
TK
Girish Bharadwaj - 16 Sep 2004 23:19 GMT
From what I can see , It looks like FileSystemWatcher does that explicitly within its handler for notification changes (in unmanaged hook). I might be totally wrong of course.

In its CompletionStatusChanged() handler, when it gets the name of the file, it explicitly converts it to lower case.
:(

I guess you probably will need to
1. Pass this as a bug so to MS.
2. Write your own win32 event notifications handler (probably in C++) which is not that hard.
Sorry.            

Signature

Girish Bharadwaj
http://msmvps.com/gbvb

> Hi,
>
[quoted text clipped - 20 lines]
> best reagards,
> TK
TK - 23 Sep 2004 23:40 GMT
Thank you for your help Girish.
I'll follow you.

Thanks again,
TK

> From what I can see , It looks like FileSystemWatcher does that explicitly within its handler for notification changes (in unmanaged hook). I might be
totally wrong of course.

> In its CompletionStatusChanged() handler, when it gets the name of the file, it explicitly converts it to lower case.
> :(
[quoted text clipped - 28 lines]
> > best reagards,
> > TK

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.