Symbolic links & Junctions issues

I currently have 2 issues involving symbolic links and junctions.

First, Directory Opus is unable to show a .zip file's content in the Viewer Pane when the .zip file is actually a SymLink to a zip file. Additionally, double-clicking the file brings up an error message (An error occurred reading archive: The system cannot find the path specified. (3)). My dopus is set to handle zip files.

Second, copying a folder that contains a junction:

  • Using Windows Explorer, the junction becomes a normal folder in the target location and the files inside are not copied over.
  • Using Directory Opus, the junction becomes a normal folder but all files within are copied.

Of course, different users will prefer different behaviors here! So I'm suggesting a new option (or an "advanced copy/move" dialog prehaps) that will allow more control over this. I think it should support all 3 cases:

  • Windows Explorer behavior (empty folder is created in target, junction is lost, files are not copied)
  • Opus behavior (files are copied, junction becomes normal folder in target)
  • New behavior (preserve junction in target) <-- This is what I need actually :wink:

In the 2 issues above, I have not tried to switch between SymLink/Junction, so I'm not sure if they apply to both.

It would be great also to implement a "follow link" click modifier (and a sticky option to go with it I guess). For instance, alt-clicking a link would take me to the link's target instead of the normal behavior...

Thanks!

(BTW, it's best to use a separate thread for each issue.)

Confirmed with Soft Links. (Is OK with hard links.) I've added this to our issue queue.

[quote]Second, copying a folder that contains a junction:

  • Using Windows Explorer, the junction becomes a normal folder in the target location and the files inside are not copied over.
  • Using Directory Opus, the junction becomes a normal folder but all files within are copied.

Of course, different users will prefer different behaviors here! So I'm suggesting a new option (or an "advanced copy/move" dialog prehaps) that will allow more control over this. I think it should support all 3 cases:

  • Windows Explorer behavior (empty folder is created in target, junction is lost, files are not copied)
  • Opus behavior (files are copied, junction becomes normal folder in target)
  • New behavior (preserve junction in target) <-- This is what I need actually :wink:[/quote]

What Explorer does doesn't make any sense to me, and isn't what you want either, so I don't think it's worth adding that as an option.

Being able to copy junctions as junctions may be worth adding, although it is also quite complex and also a little esoteric.

If the junction being copied points to a folder which is also being copied, should the new junction point to the original folder, or to the new copy? Just detecting that and doing different things in each case is complex enough, both for the code and for the user to understand. (And, if any junctions are created implicitly, it's really important that the user always knows and understands what has happened, in case they go and delete the original directory without realising the copy they made isn't really a copy.)

If the junction points to something on another drive, it may not be possible to re-create it in the destination. (Should that then be an error, or converted into what Opus does now, where it copies the data normally?)

TBH, I think it is very unusual to need to copy junctions regularly enough that you can't do it by hand. There are specialised command-line tools and scripts out there (and an Opus script could also be written) but each one is slightly different, since there are so many different cases to handle and different esoteric requirements from each person who needed to do something like this...

Go OpenContainer=Target will work with shortcuts, junctions and soft links. You could put that on alt double-click via file types. If you wanted a toggle option that affects normal double-clicks, it's possible to do that via scripting and variables. Play music albums when their folders are double-clicked is an example script which changes what happens when folders are double-clicked.

Thanks Leo,

I agree with you on the aspect of trying to preserve the link, there are many complications revolving around it.

Even though it's true that the Windows Explorer behavior is funky, in my case it's closer to what I want. I'm on a development environment and these junctions point to roughly 2gb of binaries that I compile on a regular basis and that I do not want to copy over. Think data vs binaries: i want to be able to keep several sets of data for backup/restoring, but I always want to work with the latest binaries. I never tried Opus scripts but since I have a lot on my hands, I guess I'll just use Windows Explorer for that specific action.

Still, it wouldn't hurt to have the ability to tell Opus to skip any link it encounters, if it's a trivial feature to implement.

Good day, sir :slight_smile:

We've made a change for a future version so that you can use a copy filter to make the operation skip junctions.

It will skip them entirely, without creating the empty folders, so it won't be exactly the same as Explorer. That's presumably good if you intend to create the junctions afterwards (since it saves having to delete the empty folders), or neither good nor bad if the aim is to just not copy the redundant data.

The filter would look like this:

[ul][li]Subfolder - No Match
[ul][li]Type - Match - [Junctions/Links/Shortcuts][/li][/ul][/li][/ul]

In the current release you can't put a Type clause inside a Subfolder clause, which is why this needed a code change to allow that.

Thanks, looking forward to it :slight_smile: