INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Symlinks or shortcuts  (Read 1988 times)

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Symlinks or shortcuts
« on: April 09, 2007, 04:15:24 pm »

I have a couple of compilation albums with songs I also have in the full album.

Since I have quite a few double songs that I don't want to delete because I want to keep albums complete, I was thinking how a symlink or shortcut could be a real space saver. A new database entry with different tags (only in the DB) pointing to the same physical file. Or even a dummy file with only tags that MC links to the real file?

Or maybe something like that is already possible and I missing it?
Logged

mlefebvre

  • Galactic Citizen
  • ****
  • Posts: 452
  • nothing more to say...
Re: Symlinks or shortcuts
« Reply #1 on: April 09, 2007, 04:28:36 pm »

I pretty sure that MC cannot do that.

I used to think the same way as you, but with time and declining hard drive prices, I now don't even think about it.

When you think about it, a 320 GB drive costs about $100 now a days. If you are compressing to MP3, that should be good for 50,000 songs (no real calculations done here, just an educated guess...).

Each song is costing about 2/10 of a penny to store.... (wink)

Michel.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Symlinks or shortcuts
« Reply #2 on: April 09, 2007, 04:44:00 pm »

I didn't actually suggest it to save myself some space; I have over 1TB to my disposal. I just thought the idea would be a neat feature and if I am not mistaken you are a fan of hierarchical databases this should fit right in  ;D  ;)
Logged

mlefebvre

  • Galactic Citizen
  • ****
  • Posts: 452
  • nothing more to say...
Re: Symlinks or shortcuts
« Reply #3 on: April 09, 2007, 04:44:59 pm »

 ;)
Logged

dcwebman

  • Citizen of the Universe
  • *****
  • Posts: 2153
Re: Symlinks or shortcuts
« Reply #4 on: April 10, 2007, 06:21:13 am »

Yes, this has been requested many times so maybe we'll see it someday. Sure, prices are getting cheaper for hard drives but I also like backing up my hard drives and having duplicate files just makes the backup take longer.
Logged
Jeff

ThoBar

  • Citizen of the Universe
  • *****
  • Posts: 992
  • Was confishy
Re: Symlinks or shortcuts
« Reply #5 on: April 10, 2007, 06:39:27 am »

Yup, Big fan of junctions here...

Makes it really easy to get 8 separate drives into one shared folder too ;)

Cheers,
C.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Symlinks or shortcuts
« Reply #6 on: April 10, 2007, 07:19:03 am »

Heh, i wondered about this exact thing some yrs ago, but the only way you can do this is with an NTFS junction. You would have to manage that outside of MC.

As times goes on, this can become quite a crow's nest, not to mention the fact that junctions are not reliably handled in win explorer, deleting a junction in win explorer deletes the file/dir pointed to !!!

So you would need more robust software just to manage that.

There is a way to create symlinks using cue files, but thats another very tedious process in itself. The backend is there, but there has been no will to implement a usuable front end to date.

In the end, i thought screw it, i'll just keep the copies, i prefer my albums complete in any case and self contained.

Now I'm not even sure if this shorcut thing is a practice to be encouraged, simply because of the maintenance headaches it causes.
Logged

Magic_Randy

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2350
  • I used to be indecisive, but now I'm not so sure..
Re: Symlinks or shortcuts
« Reply #7 on: April 10, 2007, 09:48:57 am »

At least for me this is not an issue. I have over 3,000 tracks that could possibly be eliminated (same name, same artist), but a lot of them are actually different.  Different versions on different albums. In some cases different versions of the same song on a single album.  Even if the feature was there in MC, I definitely would not use it.

There are other reasons why it is not worth it to me:
1) Disk is cheap, so I don't worry about that
2) I can logically eliminate duplicates in any smartlist
3) I use Genie backup software with the mirror type backup (backups take almost no time)
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1571
Re: Symlinks or shortcuts
« Reply #8 on: April 10, 2007, 05:43:13 pm »

Heh, i wondered about this exact thing some yrs ago, but the only way you can do this is with an NTFS junction. You would have to manage that outside of MC.

As times goes on, this can become quite a crow's nest, not to mention the fact that junctions are not reliably handled in win explorer, deleting a junction in win explorer deletes the file/dir pointed to !!!

So you would need more robust software just to manage that.

There is a way to create symlinks using cue files, but thats another very tedious process in itself. The backend is there, but there has been no will to implement a usuable front end to date.

In the end, i thought screw it, i'll just keep the copies, i prefer my albums complete in any case and self contained.

Now I'm not even sure if this shorcut thing is a practice to be encouraged, simply because of the maintenance headaches it causes.

Not sure if we're referring to the same thing or not, but NTFS hardlinks would work very nicely here. These are used extensively within the MSTS community, and do precisely the job looked for. Deleting them doesn't delete the original file either- Makes me wonder if that was simply a bug/ behaviour found in early versions in NTFS?
I'll post a BAT file for creating hardlinks some stage on Thursday when I have access to my windows box, but what would really be needed is a way of integrating this into MC directly.

-Leezer-
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Symlinks or shortcuts
« Reply #9 on: April 11, 2007, 04:02:48 am »

I was referring just to junctions (or symlinks) not hardlinks, and this is with XP.

When i mentioned maintenance headaches, i was referring to moving stuff around. I find from time to time i regroup albums, so if an artist has 3 or more albums then it gets dropped into this artists' folder. Or i might prefer to create a label folder and move all its artists to it. I realise i could keep things as they are using MC, but i like to do a basic level of organistation on the filesystem itself, so i'm less dependent on MC.

The problem with links (hard or soft) is how do you keep them updated.

What happens when the source they refer to is moved ?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8970
Re: Symlinks or shortcuts
« Reply #10 on: April 11, 2007, 05:46:13 am »

I had a brief, very brief, look at "hardlinks" and found a MS web page detailing the use of FSUTIL to create them.

Using a single test file, I found:

  • hardlinks across different drives are not supported.
  • when the hardlink is created, there would appear to be little benefit, as to all intents and purposes, it showed up as a new file, occupying 27mb of hdd space.
  • editing the tags and viewing the info presented in the Format tag window showed that the two files did actually appear to be one. The only way I could see to prevent this from quickly developing into a tagging nightmare would be to prevent MC from writing any file tags at all. ie. keep everything database only.
  • Using MC, I ran a rename from properties on the 'virtual' file, which moved it to another drive. This made the file to be a 'real' file in its own right.
I've deleted the files.

For a couple of years now, I've been keeping all files and using a duplicates management view scheme + playlist setup to ensure that the same file is always picked by smartlist search strings, while the dupes remain available for full album playback if that happens to be the mood I'm in at the time. The basic foundations are still the same, though I have tweaked things a little for v12 and all just works that little bit sweeter now! (I'll get around to updating the pages eventually)

-marko.

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Symlinks or shortcuts
« Reply #11 on: April 11, 2007, 05:52:44 am »

Hard or softlinks or junctions or whatever lame way M$ came up with to defunct a perfect feature from *nix won't work because editing tags will edit them in the original file so there is no way to have the same track in different albums.

So either MC need to support multiple database entries pointing to the same file or use a dummy file in the album folder linked to the audio from another file.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Symlinks or shortcuts
« Reply #12 on: April 11, 2007, 06:26:34 am »

  • hardlinks across different drives are not supported.
Probably the reason i settled with junctions for the purposes of the experiment. I have several partitions over 3 HDs.

  • editing the tags and viewing the info presented in the Format tag window showed that the two files did actually appear to be one. The only way I could see to prevent this from quickly developing into a tagging nightmare would be to prevent MC from writing any file tags at all. ie. keep everything database only.
Correct, this is how you get around the 'different-tags-updating-the-same-file' problem as the filepaths are different.

i've been running database only for over a yr now (for other reasons), and would *NOT* recommend managing duplicates in this way for the simple reason that as far as MC is concerned the links are just like normal files, so its easy to make mistakes and there would be no feedback.
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1571
Re: Symlinks or shortcuts
« Reply #13 on: April 11, 2007, 05:39:19 pm »

I had a brief, very brief, look at "hardlinks" and found a MS web page detailing the use of FSUTIL to create them.

Using a single test file, I found:

  • hardlinks across different drives are not supported.
  • when the hardlink is created, there would appear to be little benefit, as to all intents and purposes, it showed up as a new file, occupying 27mb of hdd space.
  • editing the tags and viewing the info presented in the Format tag window showed that the two files did actually appear to be one. The only way I could see to prevent this from quickly developing into a tagging nightmare would be to prevent MC from writing any file tags at all. ie. keep everything database only.
  • Using MC, I ran a rename from properties on the 'virtual' file, which moved it to another drive. This made the file to be a 'real' file in its own right.
I've deleted the files.

For a couple of years now, I've been keeping all files and using a duplicates management view scheme + playlist setup to ensure that the same file is always picked by smartlist search strings, while the dupes remain available for full album playback if that happens to be the mood I'm in at the time. The basic foundations are still the same, though I have tweaked things a little for v12 and all just works that little bit sweeter now! (I'll get around to updating the pages eventually)

-marko.

I admit I've never tried them across drives, but what's the point  ;D
While the linked file shows up as occupying disk space, this disk space isn't taken off the whole available for the drive. (Try it with a 4 gig or so ISO file, and this'll demonstrate things much better)
Again, I've never tried tagging hardlinks- Thier use in MSTS is generally limited to unchanging files, but I wouldn't be adverse to a database only solution. Admittedly, this could cause some nasty problems with MC if two sets of tags are trying to be written to the same underlying file.

Anyway, its one more option. I'll post the MSTS bat tomorrow evening  :-X

-Leezer-
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1571
Re: Symlinks or shortcuts
« Reply #14 on: April 13, 2007, 06:46:03 am »

OK, as promised, this is what I'm using:
Code: [Select]
fustil hardlink create \Music\example\example1.mp3 \Music\example2\example.mp3
The paths should be the full path on the drive, but without the drive letter. (Its also possible to do this with relative paths, but it can become a pain in the neck)
You can either stick this into a BAT file or just run from the command line as appropriate.

This was the original MSTS thread on hardlinks, nothing particularly useful in there, but does have some further discussion:
http://forums.uktrainsim.com/viewtopic.php?t=40837

Cheers

-Leezer-
Logged
Pages: [1]   Go Up