Can DOpus create junctions easily?

Hello, I love the new DOpus look, however, what I now see a lot of is junctions.
They seem to look like shortcuts but if double-clicked you get an error.

My understanding of them (junctions) is limited, but could this feature be useful for I am trying to teach myself Delphi from an old book that wants me to place a folder for test purposes on the root directory as "c:\TEACH". I would rather this folder was placed in users\myname\documents\ can this be achieved by the creation of a junction? If so how?

:smiley:

You can create junctions with Opus but I'm not sure how it will help you here, unless you want the folder to be in Documents so that it's part of your roaming profile and available on multiple machines.

Junctions are best avoided if there isn't a good reason for them and I think in this case you'd get just as good a result if you created C:\Teach and then made a shortcut to it from your Documents folder (for easy access). That's pretty much all a junction will give you anyway, except that junctions can be followed by all programs while shortcuts won't be; but if the shortcut is only going to be used by you as a quick way to get to the folder then it'll do the job fine.

Does the Delphi book come with a disk with source code on it? If not then C:\Teach will be specified in the code the book tells you to type in so you can change the path to something else as you write the programs.

I don't quite agree with you that junctions are best avoided. I find them incredible useful actually.

Just to give you a few examples on how I use them:

  • Organizing my music. I have my collection separated on several different drives, both separate HDD's and partitions. With junctions, I can have them all in the "Music" folder on my system drive. This makes it all easily accessible no matter what player I'm currently using.

  • Movies --- See above.

  • Games that supports custom soundtracks. I don't want several copies of the same music several places on my HDD, so by using junctions I can have each game use the same library of music.

  • Programming - When I'm working on a larger project I never ever want to keep the files on my system drive as that's just a disaster waiting to happen. Junctions allow me to keep the projects easily available from my "Documents" folder, but keep the real files on a network drive.

In general, I just like using junctions as a way to keep my filesystem organized without the limitations of simple links.

-- Dopus does support both creating and reading junctions without problems. What it does have problems with are hard/soft links, which will can give you problems as described in the original post.

The only problem described in the original post (double-clicking a junction gives an error) is nothing to do with Opus, but is caused by the fact that Microsoft have set "deny all" permissions on most of the standard junctions in Vista. You will get the same error from Explorer as well.

What problems with hard/soft links are there that you experience?

The only problem described in the original post (double-clicking a junction gives an error) is nothing to do with Opus, but is caused by the fact that Microsoft have set "deny all" permissions on most of the standard junctions in Vista. You will get the same error from Explorer as well.

What problems with hard/soft links are there that you experience?[/quote]

Actually, there doesn't seem to be any problems... After reading your post, I double-checked those links that I said was causing me problems, and it turned out that the drive that they linked to had accidently been moved :blush:

Thanks, to all that contributed to this post :smiley:

After reading them all it's probably best for me to simply create a shortcut (as Nudel suggested) however I can see how useful a junction could be for organizing files that are dispersed all over the place. (like mine :smiley: ). Also soft and hard links were mentioned. Whilst this is briefly touched on could a more detailed explaination be expounded maybe, if here is not appropriate then in the tutorials area.
I still don't know how to create a junction in Directory Opus 9 and would love to know as much about them as well as soft and hard links. I prefer to lean by example, and sometimes find difficulty understanding a straight definition on its own.

Thanks

These commands create soft links (Vista only), hard links and junctions:

Copy MAKELINK=softlink
Copy MAKELINK=hardlink
Copy MAKELINK=junction

The links (or whatever) will be created in the destinaton for the selected items in the source.

I would not advise experimenting with links and junctions as a way to learn what they do. You can end up creating a mess or accidentally deleting data instead of just the links/junctions. Read up on what they do and mean before you start creating them.

Keep in mind that not all programs are link-aware and copying, deleting and backing-up links in different programs can have unexpected effects. This is why I said they're not something you should use unless you have a good reason to.

A question remains: how to unlink a junction created in DOpus without deleting all of the content, which is also lost in the original location? At the moment I'm still using the NTFSLink utility, but since DOpus has the ability to create junctions, it should be able to remove them too, shouldn't it?

I think you just delete the link. Opus 9 is link-aware and should remove the link but not what it points to, although it's best to double-check that it does what you want in a test area.

Be careful if deleting to the recycle bin on Windows versions before Windows Vista as I don't think the shell understands links and, since the shell handles recycle-bin deletes, it will recursively delete everything inside the directory.

All the more reason to avoid links unless you really need them.

Okay, I see. Disabling the recycle bin might help. Being a part-time Unix guy, I'm rather gravitated to symbolic links and such. Linking a directory into multiple web roots is just not possible with traditional Windows shortcuts.

I am used to junctions so much, I do not feel the need to resign using them :wink: And they're one of the important reasons why I bought DO9 immediately ...

I gave it a try, and you're right, the recycle bin has to be circumvented in XP.