NB: Not off-topic!
I'm trying to build a one-click solution to switch between various Perl versions on Win for my colleagues.
Using portableshell.bat from strawberries portable versions works very good so far.
It will basically add the needed PATHs in %PATH%
C:\perls\strawberry-perl-5.32.1.1-64bit-portable\perl\site\bin;C:\perls\strawberry-perl-5.32.1.1-64bit-portable\perl\\bin;C:\perls\strawberry-perl-5.32.1.1-64bit-portable\c\bin;C:\Windows\system32;... etc
To make this even more idiot proof (talking about me not my colleagues ;) I'd like to purge all older entries from PATH C:\perls\*;
My BAT-Shell knowhow is limited, I was only able to find a weak solution by replacing C:\perls\ with a dummy DISABLED to "sabotage" those entries, but it'll keep ugly artifacts in the PATH. (I doubt this will insert much of a performance penalty)
So is there a good way to delete those older entries?
(off course I could spawn a perl one-liner, but the basic idea of BAT is to keep the delay minimal)
Thanks
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
PS: Yes I know about berrybrew, and I will look into it. But for the time being we need to extend this solution to support ActiveState too.
In reply to Cleaning %PATH% with WinBatch by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |