How to check whether two file names point to the same physical file in C/C#/cmd on Windows?

Viewed 121

Is there a simple way (like some low level Windows API) to know whether two absolute path of file names point to the same physical file on Windows in C# or C or cmd? Existing question seems to be about Unix and doesn't consider details bellow.

They may be:

(1) Real file

(2) Symbolic link

(3) Whose path contains some folder that is directory symbolic links (like created by mklink /d)

C# is best. If C then will Pinvoke it. If cmd then will Process.Start it.

0 Answers
Related