#Try pairing the python command with Get-ChildItem. something like this: $fileInfo = Get-ChildItem -Path 'C:PathToSomeFiles*.*' -Exclude '*Exclude*' python3 -m zipfile -c zipName.zip $fileInfo.FullName