Pack Source Code into ZIP using a PowerShell Script registered as Windows Explorer command for directories
Packs your Source Code into a ZIP without binaries and other artifacts!
- Run this script as admin to register this script in the Registry as Windows Explorer command for directories
- Now run the script from the Windows Explorer on any directory containing code :-)
Alternative: Run Script from PowerShell console with the code directory as parameter:
.\PackSourceCodeIntoZip.ps1 "T:\temp\HelloWorld1.0"
The script is not signed! If you see an error "is not digitally signed. You cannot run this script on the current system." either
- sign the script,
- change your execution policy or
- bypass the execution policy:
powershell.exe -noprofile -executionpolicy bypass -file .\PackSourceCodeIntoZip.ps1
powershell.exe -noprofile -executionpolicy bypass -file .\PackSourceCodeIntoZip.ps1 "T:\temp\HelloWorld1.0"
- You can configure the directories and files to exclude within the script ($excludeDirs, $excludeFiles)
- You can configure an optional Readme file to add to all created ZIP archives ($readmeFile)