function OnInit(initData) { initData.name = "Ungroup"; initData.version = "1.0"; initData.copyright = "(c) 2020 Leo Davidson"; initData.url = "https://resource.dopus.com/t/how-to-write-a-script-to-cancel-the-set-group-by-in-a-lister/35793"; initData.desc = "Exit group mode when changing folder"; initData.default_enable = true; initData.min_version = "12.0"; } function OnBeforeFolderChange(afterFolderChangeData) { var cmd = DOpus.Create.Command(); cmd.SetSourceTab(afterFolderChangeData.tab); cmd.RunCommand("Set GROUPBY=off"); }