What is locking my file?

Does Dopus have a built-in feature that can tell me who is locking a selected file?

Because I often get such messages:

That drives me crazy! I don't think it has anything to do with Opus.
I have searched the internet many times in the hope of finding a solution. When I do find 'solutions' online and try to follow the instructions, either I can't follow the instructions because the setting/options are not where the 'solution' said they would be, or I follow the instructions and the problem persists.
The number of articles online about this seems to indicate it's a widespread problem.

Maybe this is a Windows problem with the same frequency as the "100%-CPU-usage" problem.

Opus no to my knowledge (apart some script you can make to search for open tabs referencing some drive letter).
PowerToys has something like that, even though I think it works best on files than drives.
Following scripts adds a command that lets you search for all tabs referencing a path on a specific drive :
CheckDriveInOpenTabs.opusscriptinstall (2.2 KB)

Button to use it (parametered for z: drive) :
List open tabs on Z;_.dcf (426 Bytes)

Code (without GUI) :

// CheckDriveInOpenTabs
// (c) 2024 SALESSIO

// This is a script for Directory Opus.
// See https://www.gpsoft.com.au/endpoints/redirect.php?page=scripts for development information.



// Called by Directory Opus to initialize the script
function OnInit(initData)
{
	initData.name = "CheckDriveInOpenTabs";
	initData.version = "1.0";
	initData.copyright = "(c) 2024 SALESSIO";
//	initData.url = "https://resource.dopus.com/c/buttons-scripts/16";
	initData.desc = "";
	initData.default_enable = true;
	initData.min_version = "13.0";

	var cmd = initData.AddCommand();
	cmd.name = "CheckDriveInOpenTabs";
	cmd.method = "OnCheckDriveInOpenTabs";
	cmd.desc = "";
	cmd.label = "CheckDriveInOpenTabs";
	cmd.template = "LETTER/K,CONSOLE/S";
	cmd.hide = false;
	cmd.icon = "script";

}


// Implement the CheckDriveInOpenTabs command
function OnCheckDriveInOpenTabs(scriptCmdData)
{
	var cdf = scriptCmdData.func;
	var args = cdf.args;

	if ( !args.got_arg.LETTER ) {
		DOpus.Output("No drive letter provided. Exiting");
		// TODO : Display alert window.
		return;
	}
	var drive = args.LETTER.toUpperCase() + ":\\";
	var driveId = ConvertDriveLetterToInt(args.LETTER);

	DOpus.Output("Check open tabs folders across all windows and look for tabs on drive : " + drive + " (id=" + driveId + ")" );
	var listTabs = DOpus.Create().Vector();
	for(var eListers = new Enumerator(DOpus.listers); !eListers.atEnd(); eListers.moveNext())
	{
		for (var eTabs = new Enumerator(eListers.item().tabs); !eTabs.atEnd(); eTabs.moveNext())
		{
			// DOpus.Output("  " + (eTabs.item().path.drive == driveId) + " > " + eTabs.item().path );
			if (eTabs.item().path.drive == driveId)
				//listTabs.push_back(eListers.item().title + "(" + eListers.item().windowstate + ") | " + eTabs.item().path);
				listTabs.push_back( { title: eListers.item().title, state: eListers.item().windowstate, path: eTabs.item().path } );
		}
	}

	if (cdf.args.got_arg.console) {
		dout("Matching tabs : ");
		if (listTabs.count == 0) dout (" >> None");
		for (var e = new Enumerator(listTabs); !e.atEnd(); e.moveNext()) {
			var i = e.item();
			dout(" >> " + i.title + "\t\t(" + i.state + ") \t| " + i.path);
		}
	}
	else {
		var dlg = DOpus.Dlg;
		dlg.window = cdf.sourcetab;
		dlg.template = "MainDlg";
		dlg.detach = true;
		dlg.Show();

		dlg.control("mutLabel").Title = '<u><font color="#ff9933">Open tabs refering to drive <b>' + drive + '</b> [ lister title (window state) | path ] :</font></u>';

		var finalMsg = "";
		// testing big list
		////for (z=1; z<10; z++) {
		for (var e = new Enumerator(listTabs); !e.atEnd(); e.moveNext()) {
			i = e.item();
			finalMsg += '<font color="#42b9f5">' + i.title + '</#>  <font color="#ac9eb0">(' + i.state + ')</#>  |  <font color="#dbc88f">' + i.path + "</#>\n";
		}
		////}
		finalMsg.replace(/\n$/, "");

		if (listTabs.count == 0) dlg.control("mutTabs").Title = '<font color="#33c481">No open tabs refering to drive <b>' + drive + '</b> found ...</font>';
		else dlg.control("mutTabs").Title = finalMsg;
		
		while (true) {
			var Msg = dlg.GetMsg();
			if (!Msg.result) break;
			DOpus.Output("Msg Event = " + Msg.event);
		}
	}
}


//////////////////////////////////////////////////////////////
function ConvertDriveLetterToInt(driveLetter) {
	//dout(driveLetter.toUpperCase().charCodeAt(0));
	return Math.max(0, driveLetter.toUpperCase().charCodeAt(0) - 64);
}




//////////////////////////////////////////////////////////////
// helper dout
function dout(msg, err, timestamp) {
	if (err != undefined) {
		if (timestamp != undefined)		DOpus.Output(msg, err, timestamp);
		else							DOpus.Output(msg, err);
	}
	else								DOpus.Output(msg);
}

This problem also happens when DOpus and File Explorer are completely closed - so it cannot be a tab referencing a path on a drive.

Sometimes Everything (https://www.voidtools.com/) scans the drives and blocks them from being ejected. Or antivirus.

Fully agree. I don't mean this to be the ultimate solution, far from it !!
Just saying, that when it's that simple and you have many tabs opened, sometimes across multiple listers, that can help to identify them and close them.

Also true !!

Maybe we should revert to FAT32 where you can unplug USB drives carelessly !?!