AndrewRathbun / KAPE-EZToolsAncillaryUpdater

A script that updates KAPE (using Get-KAPEUpdate.ps1) as well as EZ Tools (within .\KAPE\Modules\bin) and the ancillary files that enhance the output of those tools
MIT License
53 stars 5 forks source link

Make Move-EZToolsNet6 function a bit leaner #5

Closed AndrewRathbun closed 2 years ago

AndrewRathbun commented 2 years ago

Take a look into leveraging the -Filter or -Include for those Copy-Item lines in the Move-EZToolsNet6 function

For instance:

    & Copy-Item -Path $kapeModulesBin\ZimmermanTools\net6\MFTECmd.dll -Destination $kapeModulesBin\ -Recurse -Force
    & Copy-Item -Path $kapeModulesBin\ZimmermanTools\net6\MFTECmd.exe -Destination $kapeModulesBin\ -Recurse -Force
    & Copy-Item -Path $kapeModulesBin\ZimmermanTools\net6\MFTECmd.runtimeconfig.json -Destination $kapeModulesBin\ -Recurse -Force

becomes:

    & Copy-Item -Path $kapeModulesBin\ZimmermanTools\net6\ -Filter MFTECmd* -Destination $kapeModulesBin\ -Recurse -Force

bottom example's syntax has not been "fact-checked" so it may be wrong, but the general idea is communicated