Follow these steps in order to resolve the issue.
A: Unlocking the bootloader voids warranty. Locking it again does not restore warranty status. mi flash error cannot find file flashalllockbat
If you have confirmed you have a Fastboot ROM, the error is likely caused by how you extracted the files. Many users extract the file using WinRAR or 7-Zip incorrectly, leaving the files nested inside multiple folders or corrupting the folder structure. Follow these steps in order to resolve the issue
Use flash_all.bat and lock the bootloader manually only if you are 100% sure the ROM supports locking without triggering ARB. mi flash error cannot find file flashalllockbat
The most frequent mistake is selecting the main folder rather than the "images" folder, or vice versa. Open the Mi Flash Tool and click Select . Navigate to your extracted ROM folder.