If you want to make it short, create a one line which.cmd file with the content
echo %~$PATH:1
This will search the first parameter (%1) fed to the script and display the full path of found file.Good place to put this script in windows 10 is%LOCALAPPDATA%\Microsoft\WindowsApps\which.cmd
And you get your which command in path.
c:\>which cmd.exec:\>echo C:\Windows\System32\cmd.exeC:\Windows\System32\cmd.exe