I tried the one line command Get-ChildItem "." | ForEach-Object { Compress-Archive -path $.Name -destinationPath "$($.Name).zip"} it works however it keeps the previous extension as well e.g if the filename is abc.csv it is now converted to abc.csv.zip is there anyway to just get abc.zip?
Thanks!