Yes, but there is no such thing like an "ununique" file under windows (except you can have hard links, but I have never seen a real life usage of that).
| [reply] [d/l] |
Not sure about uses for hard links on Windows, but I do know a little about junction links (a.k.a. reparse points). They are similar to symbolic links to a directory on UNIX. Except that barely anything actually understands them so you have to be very, very careful. For example 'rm' on UNIX would delete the symbolic link. But on Windows doing the equivalent usually blindly follows the junction link. The Junction Link Magic website has some more information and provides an interface to make use of them (Windows certainly doesn't).
I have not seen it mentioned anywhere but I believe junction links are also used when mounting to a directory. When I was running out of disk space once I moved all of my graphics stuff off to a new drive and then mounted that to the old (now empty) directory to avoid breaking applications. Later on I started using Junction Link Magic. When I did a system scan for junction links my "mounted to a dir" filesystem showed up. Perhaps that is why Microsoft created them. Now if the rest of the OS/shell would understand them....
Note: If you want to account for junction links then using the full path to determine uniqueness would not work since a unique file can potentially be accessed from two or more different paths.
| [reply] |
copy foo.txt bar.txt
I will have two files that will produce the same checksum. Clearly they're not the same file (different name, different bits on disk, etc.) yet any test using a checksum will show no difference.
That's what I meant by testing contents rather than testing files.
| [reply] [d/l] |
Oh, I got you. My point was that, because there no symbolic and rarely hard links under windows, the "unique identifier" of a file is the filename and path itself. But of course I expressed it poorly.
| [reply] [d/l] |