John,
e.FullPath should return the name of the file, it shouldn't force case
change (non-substantiated assessment) . I tested this on my computer, and,
sure enough the original case remained. Are you sure you are not changing
the case somewhere in your method? You can always use a FileInfo object and
use it's FullName property to get the original file name (assuming you're
handling change, rename, created events).
' Assumes Imports System.IO
Dim fseaPath, fiPath As String
Dim f As New FileInfo(e.FullPath)
fseaPath = e.FullPath
fiPath = f.FullName
MessageBox.Show("FileSystemEventArgs Path: " & fseaPath & ControlChars.CrLf
& "FileInfo Path: " & fiPath)
' The results I received were exactly the same, original file name,
unchanged case
"John" <Jo**@hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
You don't answer my question. Is it possible or not? End users don't like
to see the file case changes when I copy the changed files to another
directories.
"Jared" <as***********@nospam.com> wrote in message
news:10*************@corp.supernews.com... What difference doe it make? Windows file names are not case sensitive,
you can't have two files with the same name in the same base path,
distinction is not attained by case.
c:\File1.xml
C:\file1.xml --> same file
"John" <Jo**@hotmail.com> wrote in message
news:uR****************@TK2MSFTNGP09.phx.gbl... Why does the System.IO.FileSystemEventArgs (in FileSystemWatcher object)
return lower case for the file? i.e. e.FullName will return
"c:\testingfilename.xml" instead of the origiiinal
"c:\TestingFileName.xml". Do I have the option to get the original case
back? Thanks,