topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 3:44 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: mount virtual folders  (Read 5749 times)

blauand

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
IDEA: mount virtual folders
« on: May 02, 2010, 03:12 PM »
Hi,
Assign files and folders to a virtual folder and mount it to be accesible for the file system.
We are dealing, at this moment, with +75.000 files in multiple locations.

1- only files are to be listed, when a folder is dropped to the VF this has to add (recursively) only the files.
The result is just one VF with only files inside.
2- automatic synchronize (or user dependant), for new or deleted files on the original folders.

If anyone has used Directory Opus, it's a little like its Collections feature, to get you an idea.

cheers
blau


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #1 on: May 02, 2010, 03:23 PM »
NTFS Junctions wouldn't cut the cheese?
- carpe noctem

blauand

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #2 on: May 03, 2010, 01:03 PM »
i'll take a look into it
thans f0dder

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #3 on: May 03, 2010, 01:10 PM »
i'll take a look into it
thans f0dder
Let's know how it works out - NTFS junctions have a number of quirks and limitations, so might not be perfect... unfortunately I misread your post, they won't solve your point #1 - each junction will appear as a subfolder under the main folder.

I'm not sure trying to have 75k files in a single folder (even if it's virtual, with the real files in multiple subfolders scattered around) is a good idea - some applications might not deal with that amount of files very well :)
- carpe noctem

blauand

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #4 on: May 05, 2010, 05:08 AM »
I've read a lot these past two days about Junctions, hardlinks and softlinks and as you said  i couldn't find a solution for point #1, seems there is no program/script that allows to have one junction to many target (only content) folders at once.
I can think of another approach.
Get a list of all files at source dirs, compare them to destination dir containing  harklinks, skip the existing, and copying as hardlinks the new found. Not a beautiful solution with that amount of  files but it can do the work.
Do you think this can be done?
I've tried with diropus internal COPY MAKELINK=hardlink WHENEXISTS=skip
but it don't skip existing files it just append (1) and make a new file.

cheers
blau

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #5 on: May 05, 2010, 05:25 AM »
Such an approach would probably work, but the process of updating the links could be slow - if having a monitoring program (on the system hosting the "master folder") running at all times is acceptable, the overhead could be reduced. Keep in mind that hardlinks onlycan't reach out to remote machines, or even files on another partition. Vista introduced symlinks which don't have this restriction.
- carpe noctem

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #6 on: May 05, 2010, 06:37 PM »
I may not have understood what it is you're asking for, but could you not leave the files where they are and setup a folder with shortcuts to the content?

it should be pretty trivial to setup a script to monitor the source folders periodically and update the shortcuts, and you could use a junction to map the folder...

of course this presupposes that all the source files are accessible to all the users....

blauand

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: mount virtual folders
« Reply #7 on: May 07, 2010, 08:04 AM »
@f0dder
Almost did it! :)
XXCOPY  has /SG switch that gathers files into one-level directory and it works as intended.
It also has another one to copy files as hardlinks /MLH.
Then while xxcopy c:\sourcedir\nesteddirs c:\destdir /SG works nicely for normal files.
xxcopy c:\sourcedir\nesteddirs c:\destdir /SG /MLH just copy as hardlinks the files, if any, from the source dir but ignores the files from nested dirs.
But well, it's a little more progress.
BTW are you the same f0dder in osnews.com?

@target
Is it possible to do the same but instead of shortcuts, hardlinks or softlinks?

thanks both :)