in reply to Re^2: Cleaning %PATH% with WinBatch
in thread Cleaning %PATH% with WinBatch

?https://helloacm.com/which-bat-for-windows-command-shell/

Replies are listed 'Best First'.
Re^4: Cleaning %PATH% with WinBatch
by LanX (Saint) on May 23, 2022 at 11:22 UTC
    > ? which

    ? where ?

    C:\tmp>%PERL_532% /SETENV C:\tmp>where perl c:\nonBKU\strawberry-perl-5.32.1.1-64bit-portable\perl\bin\perl.exe C:\tmp>

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      A minor thing to note: where is the equivalent of the linux command which --all not of the bare which

      I use which from UnxUtils.

      which perldoc.bat C:\EX_D\ulisseDUE\perl5.20.64bit\perl\bin\perldoc.bat which --all perldoc.bat C:\EX_D\ulisseDUE\perl5.20.64bit\perl\bin\perldoc.bat C:\EX_D\ulisseDUE\perl5.26.64bit\perl\bin\perldoc.bat where perldoc.bat C:\EX_D\ulisseDUE\perl5.20.64bit\perl\bin\perldoc.bat C:\EX_D\ulisseDUE\perl5.26.64bit\perl\bin\perldoc.bat

      L*

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
        Thanks!

        I somehow remember discussing here 3 different which like commands on Win which have slightly different semantics.

        Unfortunately I can't find the thread anymore ...

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

      Use loop to build a %path without other perls?