That looks like an unfair comparison between a badly written batch one liner and a full fledged bash script (I agree that cmd.exe is much more limited).
Why do you strip off the first 3 chars from is the folder name when uninstalling?
This batch might work:
@Echo off
for /D %%f in (*) do (
If exist "%f\setup.py" (
PushD "%%f"
pip uninstall "%%f"
pip install .
PopD
)
)