Divert "Go up" / "back" in Quick Access to real parent folder

Is there way to "go up" / "back" so that opus wont go to quick access itself, but in the directory where the current "quick accessed" is located?



EDIT/NOTE: This script will be obsolete from Opus 12.15.3 on. What the script does will be the default, built-in behavior at that point.


Save this file and drag it to Preferences / Toolbars / Scripts:

QuickAccessDivert.js.txt (1.1 KB)

Edit: v1.1, updated for Opus 12.15.2 and later.

JScript code for reference:

// QuickAccessDivert

// This is a script for Directory Opus.
// See http://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information.

// Called by Directory Opus to initialize the script
function OnInit(initData)
{
	initData.name = "QuickAccessDivert";
	initData.version = "1.1";
	initData.copyright = "(c) 2016-2019 Leo Davidson";
	initData.url = "https://resource.dopus.com/viewtopic.php?f=3&t=28148";
	initData.desc = "Go Up to real parent not Quick Access";
	initData.default_enable = true;
	initData.min_version = "12.0";
}

// Called before a new folder is read in a tab
function OnBeforeFolderChange(beforeFolderChange)
{
	if (beforeFolderChange.action == "parent" || beforeFolderChange.action == "back")
	{
		// Quick Access (2nd version for Opus 12.15.2 and above).
		if (beforeFolderChange.path == "::{679F85CB-0220-4080-B29B-5540CC05AAB6}"
		||  beforeFolderChange.path == "shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}")
		{
			parentPath = beforeFolderChange.tab.path;
			if (parentPath.test_parent)
			{
				parentPath.Parent();
				return parentPath;
			}
		}
	}
}
1 Like

While using that script, I noticed the breadcrumbs path field gets a bit confused if the script diverts you to another folder. Tracked it down to something specific to the Quick Access folder, which has been fixed for the next update.

The script is still safe to use, it'll just cause the breadcrumbs field to show an empty path or similar if it diverts you, until the update.

1 Like

Are there some plans to include this script as an option in future releases of DOpus?
I was confused too, until i found this topic (thanks for the script)

And I found one more thing - if I click a folder in Quick Access, ".." button (Parent Folder button) in this folder is not working (even while the script is on). But if I open any folder of the lower level in this folder, the ".." start working fine.
Could you corrent this glitch later please?

1 Like

Hi!

I am also experiencing this kind of behaviour. The script solves my main issue, but ".." behaves just like how Hurricane describes it. Just wanted to give feedback, i am forced to use Quick Access sadly, so i became aware of this issue.

Also, thank you for the script!

We've fixed ".." in folders under Quick Access for the next update (12.15.2 beta).

Also, I've updated the script (above) with a change which will be needed from that version onwards. The new script will also work with older Opus versions, so please grab it now if you're using it, so nothing breaks.

1 Like

Many thanks! Updated the script. I really appreciate your help!

1 Like

Hi!

Tested in 12.15.2. with your updated script. It works, but if i pin a drive to QAccess, like D:\ for example, after clicking the ".." it still takes me to the QA folder, not This PC (latest Win10 x64). This may be intentional, and its not affecting me in any way. Just giving feedback.

Thanks again for the update! :partying_face:

After giving this some more thought, we're planning a change for the next beta (12.15.3) which will make the parent buttons go to the real folder's parent, rather than back up to Quick Access.

That will make the script obsolete.

(The issue with drives not going up to This PC is just because the script would need a special case to do that. Could be added, but not worth it when the script won't be needed soon.)

1 Like

12.15.3 (beta) is now available, if you want to try the changes to how Quick Access works.

As a reminder, the script above should no longer be needed, and it's probably best to disable or remove it now.

1 Like

Thank you very much for this also!

1 Like