Web lists-archives.com

Re: Automatic updating links?




On Tue, 6 Jun 2017, davidson@xxxxxxxxxxxx wrote:

On Tue, 6 Jun 2017, Rodolfo Medina wrote:
Greg Wooledge <wooledg@xxxxxxxxxxx> writes:

On Tue, Jun 06, 2017 at 06:41:03PM +0100, Rodolfo Medina wrote:
But, I
also need that, when renaming the target file, the link would automatically
change its name so that it keeps equal to the target's name...  Is this
possibile?

Totally possible. Write a library of functions with functions that
simultaneously

 1. perform the hard link manipulations you need

 2. update a database that tracks, for each media file, its
    linked-locations.

Then just use your new functions to manipulate your a/v media files.

Clarification/correction to above sentence: It's the *links* your
functions would primarily manipulate. not the files.

Problem solved.

(Apologies for sounding so glib. In my defense, I was celebrating a
little, because I realised that I too might like to have the same
functionality OP has described, and it looks not difficult to
implement.)


No.  Not without exhaustively searching the file system to find the
other links and rename them, and that would have to be something you
do manually, *not* automatically triggered by a rename.

What are you actually trying to do?

I'm making a musical mp3s library.  So I have, say, the following directory
tree: