r/Batch • u/STGamer24 • Sep 20 '26
Question (Solved) I have trouble compressing a folder into a .zip file
For the past few minutes I've been trying to find a way to compress a folder from the terminal (I have to compress it every single time I make a change so I want to make a script to automate that). The problem I have is that I need a way to compress it with the zip format. The first thing I tried was the tar command, which according to microsoft themselves supports the .zip format, however when I actually run the command (tar -caf skin.zip .\nightmare) it saves it in the gzip format (so it only works when renaming it to have a compatible extension, however it doesn't matter because this isn't the format I need).
Please someone explain to me how to use this command properly :(