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

hmm ... this looks promising ... but only shows it working for a pure set of portable SBs

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>perl -v This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x +64-multi-thread ... C:\tmp>perl -MData::Dump -E"dd \%ENV" { ... "PERL" => "C:\\Perl_524\\bin\\perl5.24.1. +exe", "PERL_524" => "C:\\Perl_524\\bin\\perl5.24.1. +exe", "PERL_530" => "C:\\nonBKU\\strawberry-perl-5. +30.3.1-64bit-portable\\portableshell.bat", "PERL_532" => "c:\\nonBKU\\strawberry-perl-5. +32.1.1-64bit-portable\\portableshell.bat ", ... } C:\tmp>perl -MData::Dump -E"dd \@INC" [ "c:/nonBKU/strawberry-perl-5.32.1.1-64bit-portable/perl/site/lib/MSW +in32-x64-multi-thread", "c:/nonBKU/strawberry-perl-5.32.1.1-64bit-portable/perl/site/lib", "c:/nonBKU/strawberry-perl-5.32.1.1-64bit-portable/perl/vendor/lib", "c:/nonBKU/strawberry-perl-5.32.1.1-64bit-portable/perl/lib", ] C:\tmp>%PERL_530% /SETENV C:\tmp>perl -v This is perl 5, version 30, subversion 3 (v5.30.3) built for MSWin32-x +64-multi-thread ... C:\tmp>perl -MData::Dump -E"dd \@INC" [ "C:/nonBKU/strawberry-perl-5.30.3.1-64bit-portable/perl/site/lib", "C:/nonBKU/strawberry-perl-5.30.3.1-64bit-portable/perl/vendor/lib", "C:/nonBKU/strawberry-perl-5.30.3.1-64bit-portable/perl/lib", ] C:\tmp>

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