Skip to main content
deleted 3 characters in body
Source Link
LotPings
  • 7.3k
  • 1
  • 16
  • 29

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
  )
)

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
  )
)

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 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
  )
)
Missed the double percetn in a batch.
Source Link
LotPings
  • 7.3k
  • 1
  • 16
  • 29

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
Setlocal EnableDelayedExpansion
for /D %f%%f in (*) do (
  If exist "%f\setup.py" (
    PushD "%f"
    set "s=%f" & set "j=!s:~3!""%%f"
    pip uninstall "!j!""%%f"
    pip install .
    PopD
  )
)

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
Setlocal EnableDelayedExpansion
for /D %f in (*) do (
  If exist "%f\setup.py" (
    PushD "%f"
    set "s=%f" & set "j=!s:~3!"
    pip uninstall "!j!"
    pip install .
    PopD
  )
)

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
  )
)
Source Link
LotPings
  • 7.3k
  • 1
  • 16
  • 29

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
Setlocal EnableDelayedExpansion
for /D %f in (*) do (
  If exist "%f\setup.py" (
    PushD "%f"
    set "s=%f" & set "j=!s:~3!"
    pip uninstall "!j!"
    pip install .
    PopD
  )
)