This may help.
If you know the serial number of the HDD you can use the batch script below to get the drive letter. From there you could use the drive letter to discover the volume or disk number using diskpart.
@echo off setlocal EnableDelayedExpansion set "xDrive=" rem Loop through all of the drives to find the external HDD for %%D in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( for /f "tokens=5" %%S in ('vol %%~D:') do set "xSerial=%%S" if "%xSerial%"=="ABCD-1234" ( set "xDrive=%%~D:" ) ) echo Drive Found = %xDrive% endlocal pause