Changing folder's format

It does this on purpose. If you normally view folders in Details mode, but want to switch to Thumbnails for a while to do something different, it will be very frustrating (at least for some people/tasks) to have it change back to Details mode every time you go into a child folder or return back to the parent. You'd have to constantly switch Thumbnails mode back on again, instead of switching it on when you want it, and then off again at the end.

If you look in the default Folder menu, or if you right-click on the format lock in the status bar, there's an option there called "reset to the folder's format" which will undo any temporary changes and give you what you would get if you opened a new window and went to that folder. You could move that to a more prominent location on the toolbars, or give it a hotkey, for a quick one-click way to reset that kind of change.

But those changes are also only local to the window you are in. (In fact, only to the folder tab you are in.) So you can also just close the window/tab and open a new one.

Those changes are only remembered if you manually/interactively make them in a folder tab, e.g. by changing modes or adding/removing columns. That isn't the case with changes that happen automatically because you entered a folder that has a special format defined for it: That kind of change is only applied while in that particular folder.

No, you don't have to do that at all. If you follow my instructions above, including the part about using a fresh window after making the changes, you should find that:

  • Opus will switch to the special format for the folder when you enter the special folder
  • Opus will also switch back to the default format when you go back to a normal folder.

Edit:

To clarify what "fresh" means, since it seems to be causing confusion, refer back to my original instructions:

Close all the Opus windows you have open. Then open a fresh window to test things in.

A fresh window means a new window. Close any old windows where you made the changes, or which had loaded stale data. Open a new window. Always open a new window to when checking if your changes are working as you want them to.

Using a fresh window doesn't mean anything. Fresh?? fresh cold hot? what's fresh?
you mean new window? so i have to restart the software??
What's fresh for you??
I change folders using the buttons/shortcuts i put on my "favourite" toolbar,like how i do on a internet brower. From there i can go anywhere.

You could just add option in preferences "reset to user default format when chaing window"
Set FORMAT=!user i think so people che decide what's bettere

you say it's frustratind to set Details every time, i say that it's more frustrating a folder change view when not asked.

I think this script will give you what you want. It uses the OnBeforeFolderChange event to reset the tab's format to its default, before changing to the new folder.

To install:

  • Download: AutoResetFormat.js.txt (811 Bytes)
  • Open Settings > Preferences / Toolbars / Scripts.
  • Drag AutoResetFormat.js.txt to the list of scripts.

Script code:

The script code from the download above is reproduced below. This is for people browsing the forum for scripting techniques. You do not need to care about this code if you just want to use the script.

// Called by Directory Opus to initialize the script
function OnInit(initData)
{
	initData.name = "AutoResetFormat";
	initData.version = "1.0";
	initData.copyright = "";
//	initData.url = "https://resource.dopus.com/viewforum.php?f=35";
	initData.desc = "Automatically reset folder to its default format on folder change";
	initData.default_enable = true;
	initData.min_version = "12.0";
}

// Called before a new folder is read in a tab
function OnBeforeFolderChange(beforeFolderChangeData)
{
	var cmd = DOpus.Create.Command;
	cmd.SetSourceTab(beforeFolderChangeData.tab);
	cmd.RunCommand("Set FORMAT=!folder");
}
1 Like