This works great for downloading 7zr for doing decompression tasks in a batch script if 7z.exe isn't in the working directory.
if not exist "7z.exe" curl -L "https://www.7-zip.org/a/7zr.exe" -o 7z.exe
But what if I have 7-zip installed and 7z.exe is in the PATH. I would prefer to skip downloading 7zr in that case, then continue with the decompression tasks.
Edit: This use case is just an example. My intention is to distribute batch scripts that download required stuff if necessary.