How to write powershell script function to create a zip file excluding .tmp files and bin, obj folder
I tried and found this:
function create-zip([String] $dir, [String] $Zipfile){
[string]$pathZipExe = "C:\Program Files\7-zip\7z.exe";
[Array]$arguments = "a", "-tzip", "$Zipfile", "$dir";
& $pathZipExe $arguments;
}
This code zip all file folder of the source directory but how to exclude .tmp files and "bin", "obj" folders of the source directory from zip