المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Get correct case of Filename



C# Programming
03-05-2010, 02:11 PM
Hi,

I make somethin like:

File.WriteAllBytes("C:\\test.TXT", mybytes);
FileInfo fi = new FileInfo("C:\\test.txt");

Now fi.Fullname returns the lower case FileName, but I need to get the correct cased file name.
Is there any way whithout doing a enumerate directory, and compare the strings?

Thanks
-- Daniel