View contents of multiple folders in one folder

2

1

I am looking for a way to create a folder that lists the content of multiple other folders in a similar way to what those "Libraries" (or whatever they are called) do in newer Windows versions.

This "virtual folder" and the source folder should be available on my home network via NFS and SMB.

I do not need to create new files in this view, so I don't care where they would be saves. It would be nice however, if I could edit the files actually located in other folders from this view.

Background:
Just in case someone wonders why I want this: I like to record series I watch on TV and watch them again after some time. I also like to have my storage separated into finished seasons and currently running seasons. A convenient way of viewing the combined content of both folder would be a nice, although not necessary gimmick. I like gimmicks ;)

Antagonym

Posted 2015-06-13T12:48:08.057

Reputation: 41

1Often, you cannot walk away from a solution only because it is too much work. For instance, this occurs every time te proposed solution is the fastest solution. – MariusMatutiae – 2015-06-14T08:15:34.367

Answers

2

You can try with ln -s path/to/original/file path/to/new/Directory_Name

ln - make links between files

-s, --symbolic
make symbolic links instead of hard links

After you should find the need to fix the sharing rights in the original directory... but it should work. Creating link works for files and directories too.

Hastur

Posted 2015-06-13T12:48:08.057

Reputation: 15 043

Linking every single file of the original directory into this combined view would probably work, but I discarded this option, as it seems too much work. – Antagonym – 2015-06-13T13:32:54.747

1Not really ln -s /full/path/origin/* . and you link all with a single command (in the present directory .) Links are fast to be created and recreated... rm Collector/LinksDir/* ; ln -s /all/Tv/Series/Name*/Season*/* . – Hastur – 2015-06-13T13:34:43.950

Granted, but it still needs some maintenance, when filenames change in the original directories or are moved from one to another one. A simple "fire-and-forget" solution would be better, if one exists. – Antagonym – 2015-06-13T13:37:41.217

1

That was a quick solution, with a couple of script (maybe in cron and on domand) you can easly update it... BTW You can search some database for collection and or TV series and manage all with those kind of program too. You can start to give a look for example here or here.

– Hastur – 2015-06-13T13:46:20.267

I am not looking for a TV series management software, I like to browse my directories and just open the file. While a cron that regularly recreates the symlinks is not as clean a solution as I would have hoped for, it is acceptable. Would you please add it to your solution? – Antagonym – 2015-06-13T13:51:35.770

@Antagonym you could always use hardlinks instead of symlinks. That way, renaming the file will not break the link. – terdon – 2015-06-14T10:12:35.740