function OnInit(initData) { initData.name = 'AutoOpenPairedFolder'; initData.version = '2024-06-28'; initData.url = 'https://resource.dopus.com/t/autoopenpairedfolder-add-in/46353'; initData.desc = 'Open paired folder in destination'; initData.default_enable = true; initData.min_version = '13.0'; } function OnAfterFolderChange(afterFolderChangeData) { if (!afterFolderChangeData.result) return; var tab = afterFolderChangeData.tab; if (!tab) return; var fsu = DOpus.FSUtil(); var pairedFolder = fsu.GetFolderPair(tab.path); if (!pairedFolder.valid) return; var cmd = DOpus.Create().Command(); cmd.SetSourceTab(tab); cmd.RunCommand('Go' + ' PATH="' + pairedFolder.path + '"' + ' NEWTAB=findexisting' + ' OPENINDUAL' + ' NOSCRIPT'); }