Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Uniquely identifying files on windows

by VSarkiss (Monsignor)
on Dec 29, 2005 at 20:27 UTC ( #519864=note: print w/replies, xml ) Need Help??

in reply to Re: Uniquely identifying files on windows
in thread Uniquely identifying files on windows

That will identify unique file contents, but it won't identify unique files. In other words, making a copy of a file will appear to be the same file.

  • Comment on Re^2: Uniquely identifying files on windows

Replies are listed 'Best First'.
Re^3: Uniquely identifying files on windows
by holli (Monsignor) on Dec 29, 2005 at 22:59 UTC
    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).

    holli, /regexed monk/
      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.

      -- Argel

        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.

        holli, /regexed monk/

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://519864]
[hippo]: Which people and how long ago?
[hippo]: It's documented in the synopsis of perlsub anyway.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-05-22 10:17 GMT
Find Nodes?
    Voting Booth?