SpecialFolder = "C:\Program Files" SpecialFile = "Internet Explorer" ' Called by Directory Opus to initialize the script Function OnInit(initData) initData.name = "Special Auto-Select" initData.desc = "" initData.copyright = "" initData.version = "1.0" initData.default_enable = true End Function ' Called after a new folder is read in a tab Function OnAfterFolderChange(afterFolderChangeData) If (afterFolderChangeData.tab.path = SpecialFolder) Then Set cmd = DOpus.Create.Command() cmd.SetSourceTab afterFolderChangeData.tab cmd.RunCommand "Select PATTERN=""" & SpecialFile & """ EXACT SETFOCUS DESELECTNOMATCH" End If End Function