File.Exists(@"C:WindowsSystem32inetsrvappcmd.exe") returns false, but dir shows appcmd [duplicate]

  appcmd, c++, file, system, windows

I can see C:WindowsSystem32inetsrvappcmd.exe in the folder and

dir C:WindowsSystem32inetsrvappcmd.exe

also shows the file.

But File.Exists(@"C:WindowsSystem32inetsrvappcmd.exe") returns false.

I tried File.OpenRead as this article: Why does System.IO.File.Exists(string path) return false? suggested, but still failed (System.IO.FileNotFoundException)
Why I can see C:WindowsSystem32inetsrvappcmd.exe in the folder but unable to access it programmatically?

Source: Windows Questions

LEAVE A COMMENT